Output current time : Introduction : CGI Web PYTHON TUTORIALS


PYTHON TUTORIALS » CGI Web » Introduction »

 

Output current time


#!/usr/bin/env python

import cgitb
cgitb.enable()

import time
print "Content-type: text/html"
print

print """<HTML>
<HEAD>
<TITLE>Sample CGI Script</TITLE>
</HEAD>
<BODY>
The present time is %s.
</BODY>
</HTML>""" % time.strftime("%I:%M:%S %p %Z")
print



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo CGI Web
» Introduction