I uploaded a file, script1.py, containing:
#!/usr/bin/env python
print "Content-type: text/plain\n"
print """\
<html>
<body>
<h2>Hello World!</h2>
</body>
</html>
"""to my public_html directory. I've added the line
"AddHandler cgi-script .py"
to .htaccess and set the permissions for the file...