Python cgitb Module
Example
Import cgitb and show it can enable detailed tracebacks:
import cgitb
cgitb.enable()
print("cgitb")
Try it Yourself »
Definition and Usage
The cgitb module provides detailed traceback reports for CGI scripts.
It was commonly used to debug CGI programs by displaying informative error pages.
Warning: The
cgitb module is deprecated and slated for removal in Python 3.13.Members
| Member | Description |
|---|---|
| enable() | Turn on detailed CGI traceback handler. |
| handler() | Return a function suitable for use as sys.excepthook. |