Debugger/VariablesViewer.py

changeset 41
572a009369f0
parent 13
1af94a91f439
child 42
23b45a742e17
--- a/Debugger/VariablesViewer.py	Fri Jan 08 17:04:18 2010 +0000
+++ b/Debugger/VariablesViewer.py	Fri Jan 08 19:14:19 2010 +0000
@@ -18,7 +18,7 @@
 
 from .Config import ConfigVarTypeDispStrings, ConfigVarTypeStrings
 from .VariableDetailDialog import VariableDetailDialog
-from Utilities import toUnicode
+##from Utilities import toUnicode
 
 import Preferences
 
@@ -515,24 +515,24 @@
             else:
                 return VariableItem(parent, dvar, dvalue, dtype)
         
-    def __unicode(self, s):
-        """
-        Private method to convert a string to unicode.
-        
-        @param s the string to be converted (string)
-        @return unicode representation of s (unicode object)
-        """
-        # TODO: remove me
-        if isinstance(s, type("")):
-            return s
-        try:
-            u = str(s, self.loc)
-        except TypeError:
-            u = str(s)
-        except UnicodeError:
-            u = toUnicode(s)
-        return u
-        
+##    def __unicode(self, s):
+##        """
+##        Private method to convert a string to unicode.
+##        
+##        @param s the string to be converted (string)
+##        @return unicode representation of s (unicode object)
+##        """
+##        # TODO: remove me
+##        if isinstance(s, type("")):
+##            return s
+##        try:
+##            u = str(s, self.loc)
+##        except TypeError:
+##            u = str(s)
+##        except UnicodeError:
+##            u = toUnicode(s)
+##        return u
+##        
     def __addItem(self, parent, vtype, var, value):
         """
         Private method used to add an item to the list.
@@ -568,7 +568,8 @@
                     sval = eval(value)
                 except:
                     sval = value
-            itm = self.__generateItem(parent, dvar, self.__unicode(sval), dvtype)
+##            itm = self.__generateItem(parent, dvar, self.__unicode(sval), dvtype)
+            itm = self.__generateItem(parent, dvar, str(sval), dvtype)
         
         else:
             itm = self.__generateItem(parent, dvar, value, dvtype)

eric ide

mercurial