Debugging Python ?

logistix at cathoderaymission.net logistix at cathoderaymission.net
Tue Jul 29 13:23:19 EDT 2003


pedro.werneck at bol.com.br (Pedro Werneck) wrote in message news:<ef72fb2b.0307290632.1997cb6a at posting.google.com>...
> That's a nice idea... I done something similar to redirect print
> statements to a text widget in a debug environment I am developing...
> but my point here is not to redirect output... I think a statement
> that simply does:    if __debug__: print "..."    would ease
> debugging... that:  def _print(*args):     for arg in args:        
> print arg     return True  assert _print("bla", "bla bla")  is very
> interesting but it would be nice to have a standard way to do that...
> a new statement, a modified assert statement or a new builtin... I am
> not that experienced on python, so I don't know... what do you Python
> gurus think ? Is this worth the effort ?

The logging package in the soon-to-be-released 2.3 should take care of
you, and might even be overkill ;)

http://www.python.org/doc/2.3c2/whatsnew/node9.html




More information about the Python-list mailing list