Frequently Asked Questions

Help Center Search

Managing Python Script File Extensions Under Hosting Configuration 2.0

Print this Article
Comment on this Article
Last Updated: February 19, 2007 9:30 AM

Hosting accounts running Hosting Configuration 2.0 have the option of running Python versions 2.2, 2.3, and 2.4. Files running under different versions of Python can all use the same .py extension if the version is specified in the script itself. To specify the version, type one of the following at the top of a Python script:

Python 2.2

#!/usr/bin/python
Python 2.3
#!/usr/bin/python2.3
Python 2.4
#!/usr/bin/python2.4