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.
In more detail
A CGI script prints a Content-type header line, a blank line and then HTML. Starting a new process per request is slow, so modern Python sites use frameworks such as Django or Flask instead. The course uses CGI because it shows the whole round trip with nothing hidden.
Example
print("Content-type: text/html\n")Related terms
- cgi module — A former standard library module for reading form data in CGI scripts, removed in Python 3.13.
- web server — A program that listens for web requests on a port and sends back responses.
- dynamic web page — A web page generated by a program at the moment it is requested, so its content can differ each time.
- HTML form — A part of a web page with fields and a submit button that sends what the user entered to a server program.
Taught in
- How A Web Page Reaches You — Hands-on Python: Complete Video Course & Book
- CGI: Dynamic Web Pages — Hands-on Python: Complete Video Course & Book
- HTML Forms And Dynamic Programs — Hands-on Python: Complete Video Course & Book