Python at my ISP

Tyler Eaves tyler at cg1.org
Mon Feb 3 13:52:03 EST 2003


Dave unleashed the following on comp.lang.python:
> 
> 
> 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?
> 
> Please help a newbie.
> Thanks,
> David Foderick

Here a few things to check.

You'll need shell access (IE: Telnet or SSH) for most of these.

1. From the shell: which python
If not /usr/local/bin/python, change your file.

2. .py vs .cgi - Depends on the server config

3. Try; python filename
This will confirm if python is installed, and that your code is valid.

4. Look into cgi-bin, see if it's needed

HTH
-- 
Tyler Eaves

Funadmental Python - Free Ebook!
http://cg1.org/pythontut.pdf




More information about the Python-list mailing list