CGIHTTPServer howto?
Calvin Dodge
caldodge at ix.netcom.com
Mon Sep 6 18:32:53 EDT 1999
Chui Tey wrote:
>
> Hi,
>
> I'm new to python and playing around with CGIHTTPServer. Executed test() and
> got an instant http server (wow!). Next, I tried to execute a test cgi
> script but couldn't get it to run.
>
> code 403 : CGI script is not executable ('/cgi-bin/cgitest.py')
>
> I'm running Win95, any pointers?
>
> #! 'C:\\PROGRAM FILES\\CHUITEY\\BIN\\PYTHON.EXE'
Unfortunately, Windows (any version) does not recognize the above line
as anything special (COMMAND.COM is far less sophisticated than _any_
UNIX shell).
A batch file which calls python.exe with a python script filename as an
argument _might_ work, and it might not. I had problems while playing
with it, anyway.
I had enough trouble with this that I cobbled together a simple server
which is descended from CGIServer - and all it does is import the python
file in question, then execute it. It's kinda ugly, but it works for me.
Calvin
--
"... she was a calligraphy enthusiast with a slight overbite and hair
the color
of strained peaches. I'll never forget the very first thing she said to
me -
she said: 'Hey, you've got weasels on your face'.
THAT'S when I knew it was true love!"
More information about the Python-list
mailing list