How can I tell if my host supports Python?
Jeff Epler
jepler at unpythonic.net
Mon Feb 14 19:38:10 EST 2005
If you have a shell, it's as simple as typing "python" and seeing if the
interactive interpreter appears:
$ python
Python 2.3.3 (#1, May 7 2004, 10:31:40)
[GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
If you've done this, you can find out the path to this Python
interpreter:
>>> import sys; print sys.executable
/usr/bin/python
Otherwise, the documentation for the 'cgi' module has a buried
suggestion with the simplest Python CGI program.
http://docs.python.org/lib/node462.html
that program would look something like
#!/usr/bin/python
import cgi; cgi.test()
though you must know the correct path to the Python interpreter for this
to work.
Your best bet may be to ask your webhost for help---only they know how
they've (mis)configured your system.
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050214/90083f50/attachment.sig>
More information about the Python-list
mailing list