sys.excepthack...

David C. Ullrich dullrich at sprynet.com
Wed May 14 17:39:13 EDT 2008


In article <mailman.1136.1210799421.12834.python-list at python.org>,
 Jean-Paul Calderone <exarkun at divmod.com> wrote:

> 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.

Thanks.

> Jean-Paul

-- 
David C. Ullrich



More information about the Python-list mailing list