editors/DataTypeEditor.py
changeset 2450 5024c19ca8f0
parent 2439 f0a040f1de1b
child 2737 38afed869ff6
equal deleted inserted replaced
2449:b0560adec4b7 2450:5024c19ca8f0
    24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    25 
    25 
    26 
    26 
    27 from __future__ import absolute_import
    27 from __future__ import absolute_import
    28 import re
    28 import re
    29 from types import TupleType
       
    30 from six.moves import xrange
    29 from six.moves import xrange
    31 
    30 
    32 import wx
    31 import wx
    33 import wx.grid
    32 import wx.grid
    34 import wx.lib.buttons
    33 import wx.lib.buttons
    81             if col == 0:
    80             if col == 0:
    82                 return row + 1
    81                 return row + 1
    83             colname = self.GetColLabelValue(col, False)
    82             colname = self.GetColLabelValue(col, False)
    84             value = self.data[row].get(colname, "")
    83             value = self.data[row].get(colname, "")
    85 
    84 
    86             if colname == "Type" and isinstance(value, TupleType):
    85             if colname == "Type" and isinstance(value, tuple):
    87                 if value[0] == "array":
    86                 if value[0] == "array":
    88                     return "ARRAY [%s] OF %s" % (",".join(map("..".join, value[2])), value[1])
    87                     return "ARRAY [%s] OF %s" % (",".join(map("..".join, value[2])), value[1])
    89             return value
    88             return value
    90 
    89 
    91     def SetValue(self, row, col, value):
    90     def SetValue(self, row, col, value):