12 Jan
2002
12 Jan
'02
6:50 p.m.
Tim Hicks writes:
I have a script (python) that has various try/except clauses in it. I would like to be able to get hold of the traceback from within the except block so that I can (optionally) send it as an argument to a user-friendly page summarising how the last lot of transactions went. The "README" tab in the PythonScripts product description (of, if you prefer, the corresponding file in "Products/PythonScripts") tells you how to make modules and functions available in PythonScripts (i.e. lose security restrictions).
To print the traceback, you need "sys.exc_info" and functions from the traceback module (e.g. "print_exception"). Look at the Python documentation, for details. Dieter