diff options
author | Skip Montanaro <skip@pobox.com> | 2003-06-17 12:58:31 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2003-06-17 12:58:31 (GMT) |
commit | 364ca40c2a053718f67c2032769de1f1fd76bb22 (patch) | |
tree | 8a6d6bc56830bfcf182ad2b1a50145845966b7ff /Doc | |
parent | d05abdec7b2620449369bb44a617684463ba50ac (diff) | |
download | cpython-364ca40c2a053718f67c2032769de1f1fd76bb22.zip cpython-364ca40c2a053718f67c2032769de1f1fd76bb22.tar.gz cpython-364ca40c2a053718f67c2032769de1f1fd76bb22.tar.bz2 |
SF Patch 569574 - enhancements to cgitb for plain text display
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libcgitb.tex | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/lib/libcgitb.tex b/Doc/lib/libcgitb.tex index e0e4a01..dab34c5 100644 --- a/Doc/lib/libcgitb.tex +++ b/Doc/lib/libcgitb.tex @@ -12,9 +12,12 @@ \index{exceptions!in CGI scripts} \index{tracebacks!in CGI scripts} -The \module{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 +The \module{cgitb} module provides a special exception handler for Python +scripts. (It's name is a bit misleading. It was originally designed to +display extensive traceback information in HTML for CGI scripts. It was +later generalized to also display this information in plain text.) After +this module is activated, if an uncaught exception occurs, a detailed, +formatted report will be displayed. 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 @@ -32,7 +35,7 @@ to a file for later analysis. \begin{funcdesc}{enable}{\optional{display\optional{, logdir\optional{, - context}}}} + context\optional{, format}}}}} This function causes the \module{cgitb} module to take over the interpreter's default handling for exceptions by setting the value of \code{\refmodule{sys}.excepthook}. @@ -46,6 +49,9 @@ to a file for later analysis. The optional argument \var{context} is the number of lines of context to display around the current line of source code in the traceback; this defaults to \code{5}. + If the optional argument \var{format} is \code{"html"}, the output is + formatted as HTML. Any other value forces plain text output. The default + value is \code{"html"}. \end{funcdesc} \begin{funcdesc}{handler}{\optional{info}} |