]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/demo/XMLtreeview.py
apparently the check for too small rect is needed not only with wxNB_MULTILINE (see...
[wxWidgets.git] / wxPython / demo / XMLtreeview.py
index 90d4605c85752976076911f5a7060282a31b7359..36dc81f63f57dd3e65b8026b036ad3832bc9c5be 100644 (file)
@@ -61,8 +61,7 @@ class XMLTree(wx.TreeCtrl):
 
     # Define a handler for start element events
     def StartElement(self, name, attrs ):
-        if py2:
-            name = name.encode()
+        name = name.encode()
 
         id = self.AppendItem(self.nodeStack[-1], name)
         self.nodeStack.append(id)
@@ -72,8 +71,7 @@ class XMLTree(wx.TreeCtrl):
 
     def CharacterData(self, data ):
         if data.strip():
-            if py2:
-                data = data.encode()
+            data = data.encode()
 
             self.AppendItem(self.nodeStack[-1], data)