Python at my ISP

Peter Hansen peter at engcorp.com
Mon Feb 3 13:48:59 EST 2003


Dave wrote:
> 
> Supposedly, my ISP (Valueweb) supports Python. I have been trying to
> get a script running but so far have been unsuccessful. Here is my
> script:
> 
> #!/usr/local/bin/python
> 
> print "Content-type text/html\n\n"
> print "Hello World!"
> 
> First of all, what is the correct extension that I should be using?
> .py or .cgi? I either get the script passed back to me or I get an
> access denied. I tried to chmod the file to give it execute
> permissions but that didn't fix it.
> 
> Is there anything else I can try before I contact their support?

Can you run Python manually by /usr/local/bin/python ?  If not,
you need to start by figuring out how, and if that's the right path.

Once you've solved that, the extension is mostly irrelevant.  If
the "x" bit is set, just typing the name of the script will invoke it.

What do you mean by "get the script passed back to me"?  

By the way, I realize it's just an example, but you'll have to
fix the "Content-type: text/html" part (needs the colon) before
it will work as a CGI script.

-Peter




More information about the Python-list mailing list