Mega Code Archive
Categories
/
Python Tutorial
/
CGI Web
Displays the current date and time in a Web browser
import time def printHeader( title ): print """Content-type: text/html
%s
""" % title printHeader( "Current date and time" ) print "
" + time.ctime( time.time() ) + "
" print ""