CGI Tutorial

pix
Go back to home page

This page provides some lessons in writing Python CGI scripts that accept input from the user via the ubiquitous forms, and return graphical renderings, in this case from Python's matplotlib.

This page is obsolete.

The latest page is at itmetr.net.

last modified: 05:05 PM MDT, Sun 15 Jun 2008


CGI Examples

CGI was introduced in the Regular Expressions Tutorial, if you are new to CGI, then you may want to study the references in that tutorial before proceeding.

Here you will be tutored in CGI by studying and experimenting with a system just like mine: formscgi. You may download and untar formscgi.tar (11:02 pm Nov 8, 2006 version) and install it in your public_html directory on Gentry. After changing a "bfiedler" in mesoplot2.cgi, it should work "out of the box" (for users on Gentry).

Note that CGI scripts for Gentry users are executed by Apache using suexec. Hopefully, for the purposes of completing the task, you will need to know very little about suexec. CGI scripts should have ZERO permissions for "group" and "others". Files written by your CGI scripts, and intended to be retrieved by Apache, need to be chmod'ed to allow the "group" to read it. This chmod'ing needs to be done by the script itself: see mesoplot2.cgi.


this is an obsolete site
go to new site
go to obsolete home page

pix
Move to top of page