Writing CGI Programs in Python
Python is a scripting language that is in some ways similar to Perl. Many people prefer Python because it’s highly object oriented, which makes it easy to write highly structured, maintainable programs. This section of the chapter is written for people who already know how to program in Python, but have never used Python for CGI programming.
Writing a CGI program in Python is as simple as writing one in any other language. As long as your program prints a valid content type header and generates content that conforms to that content type, you’re out of the woods. The most difficult part of writing a CGI program in any language is processing form input. Unsurprisingly, there’s a module for translating form data using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access