cgi module
A former standard library module for reading form data in CGI scripts, removed in Python 3.13.
In more detail
The course's scripts use cgi.FieldStorage() and form.getfirst(name, default) as their historical form; on a current interpreter the import fails. urllib.parse.parse_qs can read the query string instead, and the third-party legacy-cgi package restores the old module. Error display uses the traceback module in its place.
Related terms
- CGI — The Common Gateway Interface, an old standard for a web server to run a program for each request and send the program's printed output back as the page.
- query string — The part of a web address after the question mark, made of name=value pairs, such as ?state=open&limit=2.
- traceback — The report Python prints when an unhandled exception stops a program, listing the chain of calls that led there and ending with the error.
Taught in
- CGI: Dynamic Web Pages — Hands-on Python: Complete Video Course & Book
- HTML Forms And Dynamic Programs — Hands-on Python: Complete Video Course & Book
- Chapter Four In One Sitting — Hands-on Python: Complete Video Course & Book