]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/dbg.py
wxCheckListBox doesn't require wxUSE_OWNER_DRAWN when using WXUNIVERSAL
[wxWidgets.git] / wxPython / wx / tools / dbg.py
index 5c791f886417bbf94ef3b315f5b75ee83e928272..cda8d5fe2f056e07fa0f9fa2de00e60597e9618e 100644 (file)
@@ -147,8 +147,14 @@ class Logger:
             return
 
         if self._dbg and len(args) and not self._suspend:
-            # (emulate print functionality)
-            strs = [str(arg) for arg in args]
+            # (emulate print functionality; handle unicode as best as possible:)
+            strs = []
+            for arg in args:
+                try:
+                    strs.append(str(arg))
+                except:
+                    strs.append(repr(arg))
+
             output = ' '.join(strs)
             if self.name: output = self.name+': ' + output
             output = ' ' * 3 * self._indent + output