sys.excepthack...
Jean-Paul Calderone
exarkun at divmod.com
Wed May 14 17:09:45 EDT 2008
On Wed, 14 May 2008 15:47:18 -0500, "David C. Ullrich" <dullrich at sprynet.com> wrote:
> [snip]
>
>Came up with a ridiculous hack involving both sys.stderr
>and sys.excepthook. Works exactly the way I want.
>Seems ridiculous - what's the right way to do this?
>
> [snip]
Hi David,
Take a look at the traceback module. The excepthook gets called with
an exception type, instance, and traceback object. The traceback module
is good at turning these things into strings.
Jean-Paul
More information about the Python-list
mailing list