[Tutor] please help with simple python CGI script

Kent Johnson kent37 at tds.net
Fri Oct 24 16:48:55 CEST 2008


On Fri, Oct 24, 2008 at 10:25 AM, aivars <aivars868 at gmail.com> wrote:
> Hello,
>
> I am learning python.
>
> I start the python CGI server like this:
>
> python -m CGIHTTPServer (this syntax I saw in Wesley Chun's Core
> Python Programming chapter 20.5)
>
> The server starts in command prompt on windows XP by answering:
> Serving HTTP on 0.0.0.0 port 8000...
>
> Next I want to run this simple CGI script (from Deitel Python How to
> Program chapter 6). it is supposed to print out current date and time
> in a browser

The CGI script should me in a /cgi-bin subdirectory of the dir where
you run the script. The URL to run the CGI will then be something like
http:://localhost:8000/cgi-bin/myscript.py

Kent


More information about the Tutor mailing list