Sunday, March 13, 2005

I've been doing some python based CGI programming. Here is a test script to see if your web server will run a python script for you.

#!/usr/bin/env python

print 'Content-Type: text/html'
print
print '<h1>Hello!</h1>'


The first line is a link to the python interpreter which your web server will call to run the script.
The second line is sent by the web server to your browser. It tells the browser what kind of content to expect. I found you need the second line of an empty print statement for the rest of the script to work.
The third line is simple hello surrounded html tags that tell the browser to display the text as a header.

Mozilla and hypocrisy

Right, but what about the experiences that Mozilla chooses to default for users like switching to  Yahoo and making that the default upon ...