[Python-ideas] Verbose traceback formatting

Steven D'Aprano steve at pearwood.info
Thu Aug 30 16:18:22 CEST 2012

On 29/08/12 08:26, Mike Graham wrote:
> It's possible to give a lot more on error than the default traceback
> gives you. I propose that Python should ship a more verbose formatter
> and a command line switch to use it.

There's no command line switch, but the Time Machine strikes again. Save
your buggy script in a file "foo.py", then start up the interactive
interpreter and run this:

import cgitb
import foo

Personally, I find the IPython verbose formatter more readable and useful.

To revert to ordinary tracebacks:

sys.excepthook = sys.__excepthook__


More information about the Python-ideas mailing list