--- a/editors/CodeFileEditor.py Fri Nov 23 11:01:20 2018 +0100
+++ b/editors/CodeFileEditor.py Fri Nov 23 12:13:24 2018 +0100
@@ -24,12 +24,16 @@
from __future__ import absolute_import
+from __future__ import division
import re
+from builtins import str as text
import wx
import wx.grid
import wx.stc as stc
import wx.lib.buttons
+from six.moves import xrange
+
from plcopen.plcopen import TestTextElement
from plcopen.structures import TestIdentifier, IEC_KEYWORDS, DefaultType
@@ -138,9 +142,9 @@
section_comment = " %s section " % (section)
len_headers = EDGE_COLUMN - len(section_comment)
section_comment = \
- self.COMMENT_HEADER * (len_headers / 2) + \
+ self.COMMENT_HEADER * (len_headers // 2) + \
section_comment + \
- self.COMMENT_HEADER * (len_headers - len_headers / 2)
+ self.COMMENT_HEADER * (len_headers - len_headers // 2)
self.SectionsComments[section] = {
"comment": section_comment,
@@ -629,7 +633,7 @@
if col == 0:
return row + 1
else:
- return unicode(self.data[row].get(self.GetColLabelValue(col, False), ""))
+ return text(self.data[row].get(self.GetColLabelValue(col, False), ""))
def _updateColAttrs(self, grid):
"""