If you subscribe to GoDaddy hosting, you’ve likely noticed that they claim to support Python. However, if you are a noob to python and the web like myself, it’s unclear how to get started. So, below is a sample on how you can render a simple html page in Python under GoDaddy hosting.

1.) Create a new file with a .cgi extension (i.e. test.cgi – see: http://oscarvalles.com/test.cgi)
2.) Copy and paste the following text into your CGI file.

#!/usr/bin/python2.4
'''
This is a comment,
If you see this, CGI is not working
'''
print "Content-type: text/html\n\n"
print "<body bgcolor='000'>"
print "<font face='Courier New' color='white'>Test python page.  CGI extension </font>"
print "</body>"

Let the fun begin.