redirecting cgi error to browser
Jeremy Yallop
jeremy at jdyallop.freeserve.co.uk
Mon Nov 18 15:42:59 EST 2002
* les
| i would like to redirect the cgi error to my browser, for debugging purposes.
| i am looking for it on the net but am unable to find it.
| can someone please give me an example
Use the `cgitb' module from the standard library.
http://www.python.org/doc/current/lib/module-cgitb.html
``The cgitb module provides a special exception handler for CGI
scripts. After this module is activated, if an uncaught exception
occurs, a detailed, formatted report will be sent to the Web
browser. The report includes a traceback showing excerpts of the
source code for each level, as well as the values of the arguments
and local variables to currently running functions, to help you
debug the problem. Optionally, you can save this information to a
file instead of sending it to the browser.''
Jeremy.
More information about the Python-list
mailing list