[PyKDE] How to capture python tracebacks?

Dave Smith Dave.Smith at transcendata.com
Mon Sep 10 15:32:36 BST 2001


Thanks to everyone who responded!  A solution like sys.excepthook
is exactly what I was looking for, although I'll have to upgrade to
Python 2.1 to use it (I'm on python 2.0 now).  :)

Dave

Pete Ware wrote:

> If you are using Python >= 2.0, you can do:
>
>         sys.excepthook = exception_warn
>
> def exception_warn (self, type, value, traceback):
>         warning ('Python Exception', 'Exception = %s\nValue = %s\n' % (str (type) ,str (value)))
>
> --pete

--
   Dave Smith
   Software Engineer
   TranscenData -- an ITI Business
   mailto:Dave.Smith at TranscenData.com
   http://www.TranscenData.com






More information about the PyQt mailing list