Creating HTML or XHTML pages in Python is as simple as output, whether from a CGI script or the command line (or shell). Most good CGI scripts produce some form of HTML feedback to thank the user and to verify that the action of the script did take place. Some thing that is not often exploited in examples, however, is the ability to create another form field in the HTML. In this tutorial, we will go from simple output to creating new forms for user input. After that, we will also look briefly at creating web pages from the command line.
At the end of this tutorial, you will know how to use Python, both standing alone and as a CGI script, to create both plain HTML pages and HTML form pages as well as being able to feed command line options to your scripts.
