I'm having a problem getting CGI to work for Python.
I've added
Options ExecCGI
AddHandler cgi-script cgi py pl
inside /etc/apache2/sites-available/default within
and now Perl works, but Python gives out a 500 Internal Server Error..
EDIT:
This if the current 'default' file
<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www
    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride AuthConfig
            Order allow,deny
            allow from all
            AddHandler mod_python .py
            PythonHandler mod_python.publisher
            PythonDebug On
    </Directory>
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
    <Directory "/var/www/cgi-bin/">
            Options +ExecCGI
            AddHandler cgi-script .cgi .py .pl
            Allow from all
    </Directory>
Any ideas?

#!/usr/bin/pythonas the first line of your.pyfiles?