Debugging Python ?

logistix at logistix at
Tue Jul 29 19:23:19 CEST 2003

pedro.werneck at (Pedro Werneck) wrote in message news:<ef72fb2b.0307290632.1997cb6a at>...
> 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 ;)

More information about the Python-list mailing list