I've written an except hook into a script as shown below which works 
well for the most part and catches exceptions.

import sys
def myexcepthook(type,value,tb):
    do something

sys.excepthook=myexcepthook
rest of script.... (now protected by catchall exception hook)


I've been intentionally introducing errors into the code to try to test 
it and while it catches import errors and other things, it doesn't catch 
syntax errors.

Is there a way to get it to catch syntax errors?
Or is there a better way?

-h
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to