O'Reilly logo

Python Geospatial Development - Third Edition by Erik Westra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required