Now that we have the data, we can start to implement the DISTAL application itself. To keep things simple, we will use CGI scripts to implement the user interface.
What is a CGI Script?
While the details of writing CGI scripts are beyond the scope of this book, the basic concept is to print the raw HTML output to
stdout and to process the incoming CGI parameters from the browser using the built-in
To run a Python program as a CGI script on Mac OS X or Linux, you have to do two things: first, you have to add a "shebang" line to the start of the script, like this:
The exact path you use will depend on where you have Python installed on your computer. The second thing you need to do ...