[Tutor] How do you simulate a CGI script locally?

Michael Powe michael@trollope.org
Sat Dec 14 20:25:01 2002


you might try this:

http://www.embl-heidelberg.de/~chenna/pythonpages/cgimadeeasy.html

perl's cgi.pm will create a cgi environment when a script using it is
run from the command line, just for this reason.  perhaps, you should
suggest that the python cgi module include similar functionality.

however, the above appears to be a module designed to do the same thing.

mp


On Fri, Dec 13, 2002 at 05:08:22PM +1000, Alfred Milgrom wrote:
> I guess this is a pretty stupid question, but I haven't been able to find 
> the answer anywhere.
> 
> I want to develop a CGI script, and I'd like to test it locally (I mean on 
> my own computer, running Windows), rather than uploading the file to the 
> server, testing it, revising it, and so on.
> 
> My question is: how do I make my Python program behave like a CGI script, 
> where print statements end up shown in the browser window. If I point my 
> browser at my CGI test file, it runs, but the output goes to the DOS box 
> instead.
> 
> Any help would be appreciated.
> Thanks,
> Alfred Milgrom
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor