controls/VariablePanel.py
changeset 2434 07f48018b6f5
parent 2432 dbc065a2f7a5
child 2437 105c20fdeb19
equal deleted inserted replaced
2433:2e8bf28a8909 2434:07f48018b6f5
    24 
    24 
    25 
    25 
    26 from __future__ import absolute_import
    26 from __future__ import absolute_import
    27 import re
    27 import re
    28 from types import TupleType, StringType, UnicodeType
    28 from types import TupleType, StringType, UnicodeType
       
    29 from builtins import str as text
    29 
    30 
    30 import wx
    31 import wx
    31 import wx.grid
    32 import wx.grid
    32 import wx.lib.buttons
    33 import wx.lib.buttons
    33 from six.moves import xrange
    34 from six.moves import xrange
   605                 if row_content.Location != "" and LOCATION_MODEL_SET.match(row_content.Location):
   606                 if row_content.Location != "" and LOCATION_MODEL_SET.match(row_content.Location):
   606                     old_location = row_content.Location
   607                     old_location = row_content.Location
   607                     model = re.compile("%[IQM][XBWLD]?(.*\.|)")
   608                     model = re.compile("%[IQM][XBWLD]?(.*\.|)")
   608                     prefix = model.match(old_location).group(0)
   609                     prefix = model.match(old_location).group(0)
   609                     addr = int(re.split(model, old_location)[-1]) + 1
   610                     addr = int(re.split(model, old_location)[-1]) + 1
   610                     row_content.Location = prefix + unicode(addr)
   611                     row_content.Location = prefix + text(addr)
   611 
   612 
   612             if not row_content.Class:
   613             if not row_content.Class:
   613                 row_content.Class = self.DefaultTypes.get(self.Filter, self.Filter)
   614                 row_content.Class = self.DefaultTypes.get(self.Filter, self.Filter)
   614 
   615 
   615             if self.Filter == "All" and len(self.Values) > 0:
   616             if self.Filter == "All" and len(self.Values) > 0: