Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/spst/UnixTransition/doc/cgitb.html
Дата изменения: Thu Nov 5 13:46:16 2015 Дата индексирования: Sun Apr 10 19:45:20 2016 Кодировка: Поисковые слова: scientist |
cgitb (version 39758) | index /usr/local/Python-2.5/lib/python2.5/cgitb.py Module Docs |
More comprehensive traceback formatting for Python scripts.
To enable this module, do:
import cgitb; cgitb.enable()
at the top of your 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
format - 'text' or 'html' controls the output format
By default, tracebacks are displayed but not saved, the context is 5 lines
and the output format is 'html' (for backwards compatibility with the
original use of this module)
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().
The default handler displays output as HTML.
Modules | ||||||
|
Classes | ||||||||||
|
Functions | ||
|
Data | ||
__UNDEF__ = [] __author__ = 'Ka-Ping Yee' __version__ = '$Revision: 39758 $' |
Author | ||
Ka-Ping Yee |