It’s very coincidental that that you are using a custom exception
handler. Just yesterday I wrote my own. Everything that is print_ed
is completely under your control. Put a statement in at the top
like:
print '\n#### EXCEPTION: MY EXCEPTHOOK called ####\n'
There won't be any question at all whether it is being called ! And,
you won’t need to use a debugger.
The default exception handler listing is a true travesty. It's
extraordinarily difficult to read and lists the traceback in the
non-intuitive reverse order with no blank lines in between each
statement. See the attached file for my replacement handler.
The specific name of this file is special. If the file is put in the
folder [ …Lib\site-packages ] (on MS Windows platforms, at least)
it will automatically replace the default exception handler for all
users and all invocations of the Python interpreter whether the
Python session is interactive or not. I don’t know if this works on
non-MSW platforms, but, supposedly, non-MSW platforms can use this
file renamed to [ .pythonrc ] and placed in the user’s “home”
directory for per-user site customization. Otherwise, just put a
copy the file in your code development directory and import it
directly only for each app that you want.
Ray
SiteCustomize.PY (1.19 KB)