[Tutor] cgi server script

Don Arnold darnold02 at sprynet.com
Sat Sep 6 03:05:09 EDT 2003


----- Original Message -----
From: "Kirk Bailey" <idiot1 at netzero.net>
To: "Tutor" <tutor at python.org>
Sent: Friday, September 05, 2003 4:17 PM
Subject: [Tutor] cgi server script


> I am rereading Python Web Programming. In it on opage 215 is a simple
cgicapable
> script:
>
> #! C:\PYTHON22\pythonw.exe
> #
> import CGIHTTPServer, BaseHTTPServer
> httpd=BaseHTTPServer(('',8000), CGIHTTPServer.CGIHTTPRequestHandler)

The above line should read:

httpd=BaseHTTPServer.HTTPServer(('',8000),
CGIHTTPServer.CGIHTTPRequestHandler)

> httpd.serve_forever()
> # this is a small but serviceable cgi server for your pc!
>
> Well, I put it in my pc which also has idle. An alias was created, with
the
> properties:
> target: C:\Python22\pythonw.exe "C:\PYTHON22\cgiserver.py"
> start in: C:\Python22
> It refuses to run, and the pythonw.exe terminates. Anyone care to offer
some clues?
>
> end
>
> Cheers!
>          Kirk D Bailey
>

HTH,
Don




More information about the Tutor mailing list