Implementing the DISTAL application
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.
Tip
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 cgi
module.
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:
#!/usr/bin/python
The exact path you use will depend on where you have Python installed on your computer. The second thing you need to do ...
Get Python Geospatial Development - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.