Newbie Question!

fleet at teachout.org fleet at teachout.org
Tue Aug 7 12:17:59 EDT 2001


>   From: "Steve Holden" <sholden at holdenweb.com>
>Subject: Re: Newbie Question!
>
>Well I can answer your first question: see
>
>    http://pydish.holdenweb.com:8080/DeptHome/python
>
>(which is itself a pure Python web) for a small CGI server in Python. I
>think you'll be surprised how small. Run that from the same directory as an
>index.html file containing your favored HTML page, and access is at
>
>    http://127.0.0.1:8000/

Assume two givens:
  1.  The script works as advertised - attested to by "bob."
  2.  I'm clueless - can be attested to by most regular readers of this list/group for the
past couple of weeks.

I get the following when I attempt to run the script:

[/home/dev/cbamc]$ python cgiserver.py
localhost.localdomain - - [07/Aug/2001 11:32:26] code 403, message Directory listing not
supported
localhost.localdomain - - [07/Aug/2001 11:32:26] "GET / HTTP/1.0" 403 -
Traceback (innermost last):
  File "cgiserver.py", line 5, in ?
    httpd.serve_forever()
  File "/usr/lib/python1.5/SocketServer.py", line 195, in serve_forever
    self.handle_request()
  File "/usr/lib/python1.5/SocketServer.py", line 210, in handle_request
    request, client_address = self.get_request()
  File "/usr/lib/python1.5/SocketServer.py", line 223, in get_request
    return self.socket.accept()
KeyboardInterrupt <---- me getting out

The directory contains only 'index.html' (rather lengthy) and 'cgiserver.py.'

					- fleet -





More information about the Python-list mailing list