Overriding traceback print_exc()?

Bob Greschke bob at passcal.nmt.edu
Tue Oct 31 13:43:45 EST 2006


I want to cause any traceback output from my applications to show up in one 
of my dialog boxes, instead of in the command or terminal window (between 
running on Solaris, Linux, OSX and Windows systems there might not be any 
command window or terminal window to show the traceback messages in).  Do I 
want to do something like override the print_exc (or format_exc?) method of 
traceback to get the text of the message and call my dialog box routine?  If 
that is right how do I do that (monkeying with classes is all still a grey 
area to me)?

I kind of understand using the traceback module to alter the output of 
exceptions that I am looking for, but I'm after those pesky ones that should 
never happen. :)

Thanks!

Bob





More information about the Python-list mailing list