Passing cgi parameters to script...

Kent Johnson kent at kentsjohnson.com
Fri Dec 30 09:09:29 EST 2005


Diez B. Roggisch wrote:
> sophie_newbie wrote:
> 
>>Is there any way that I can pass cgi parameters to my script locally,
>>before i upload it to the webserver, so that i can debug it.
> 
> You might think of using CGIHttpServer to test your scripts in a
> server-environment - while still being local.

Which can be as simple as typing
python -c "import CGIHTTPServer; CGIHTTPServer.test()"

from the command line in the root dir of your site (the dir that 
contains the cgi-bin dir).

Kent



More information about the Python-list mailing list