Historical and Removed Modules

cgitb

Removed from the standard library in Python 3.13; historical example targets Python 3.12. Produced diagnostic reports for CGI exceptions, including HTML output and potentially local variable data. Use traceback or logging for server-side diagnostics and return generic client errors; never expose sensitive tracebacks to public clients.

Formal Syntax & Structure

python syntaxpython
import cgitb  # Historical only: removed in Python 3.13

Return Value

module (historical)

Historical module namespace, not a supported standard-library import on the Python 3.13 baseline.

Working Example

Example Snippetpython
# Historical example: Python 3.12; not executed.import cgitbprint(callable(cgitb.enable))
Python Reference