Mega Code Archive
Categories
/
Python Tutorial
/
CGI Web
Output current time
#!/usr/bin/env python import cgitb cgitb.enable() import time print "Content-type: text/html" print print """
Sample CGI Script
The present time is %s. """ % time.strftime("%I:%M:%S %p %Z") print