CGI Web Python Tutorial

import time
def printHeader( title ):
   print """Content-type: text/html
    

%s
""" % title
printHeader( "Current date and time" )
print "" + time.ctime( time.time() ) + ""
print ""