| cgitb (version 1.4) | index /usr/lib/python2.2/cgitb.py |
Handle exceptions in CGI scripts by formatting tracebacks into nice HTML.
To enable this module, do:
import cgitb; cgitb.enable()
at the top of your CGI script. The optional arguments to enable() are:
display - if true, tracebacks are displayed in the web browser
logdir - if set, tracebacks are written to files in this directory
context - number of lines of source code to show for each stack frame
By default, tracebacks are displayed but not saved, and context is 5.
Alternatively, if you have caught an exception and want cgitb to display it
for you, call cgitb.handler(). The optional argument to handler() is a 3-item
tuple (etype, evalue, etb) just like the value of sys.exc_info().
| Modules | ||||||
| ||||||
| Classes | ||||||||||
| ||||||||||
| Functions | ||
| ||
| Data | ||
| __UNDEF__ = [] __author__ = 'Ka-Ping Yee' __file__ = '/usr/lib/python2.2/cgitb.pyc' __name__ = 'cgitb' __version__ = '$Revision: 1.4 $' | ||
| Author | ||
| Ka-Ping Yee | ||