[Tutor] cgi server script

Kirk Bailey idiot1 at netzero.net
Sat Sep 6 16:35:45 EDT 2003


Steve got back to me and declared he oopsed, and also told me how the line 
should appear. I am waiting to hear what he thinks of the threading cgi server 
from the book, which also appears to have a hairball in it.

IT WORKS!!! And If I can finger (sic) out how to have it declare a default web 
directory and cgi-bin and images directory, and NOT let people walts all over 
the mainframe, this could actually become a useful little tool.

In fact, as a giggle, I may just stick it on Critter when it is done, on an 
alternate port (hmm, firewall rules...) and make the thing available with a few 
bells and whistles. For an ittybitty, it's pretty nice.

Don Arnold wrote:

> ----- 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
> 
> 
> 

-- 

-- 

end

Cheers!
         Kirk D Bailey

  +                              think                                +
   http://www.howlermonkey.net  +-----+        http://www.tinylist.org
   http://www.listville.net     | BOX |  http://www.sacredelectron.org
   Thou art free"-ERIS          +-----+     'Got a light?'-Promethieus
  +                              think                                +

Fnord.




More information about the Tutor mailing list