changing it will result in no action being taken.
You can also call the log function implicitly on the Logger
-instance, ie. you can type:
+instance, ie. you can type::
+
from wxPython.tools.dbg import Logger
dbg = Logger()
dbg('something to print')
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