User:Dvydra

Getting python up and running:

All Python CGI scripts on dreamhost MUST...


 * end in ".py" (NOTE: ".cgi" works as well)
 * have #!/usr/bin/python in the very first line of the file (NOTE: #!/usr/bin/python2.x or #!/usr/bin/env python2.x will work as well)
 * be marked as executable: chmod 755
 * use UNIX style newlines, not Windows [1]
 * If you want to view printed output from your Python code, you must print print "Content-type: text/html\n\n" as the first line of output.
 * If you don't want .py files to be executed by Apache add "RemoveHandler .py" command to your .htaccess file


 * http://wiki.dreamhost.com/Python#Virtualenv
 * http://wiki.dreamhost.com/Perl#Perl_debugging - both file and folder must be 755
 * http://www.heikkitoivonen.net/blog/2008/02/02/python-on-dreamhost/
 * http://blog.localkinegrinds.com/2007/08/20/custom-python-installation-for-django-on-dreamhost/
 * http://joefleming.net/2007/12/02/python-pylons-and-fastcgi-on-dreamhost/