Displays the current date and time in a Web browser. : Introduction : CGI Web PYTHON TUTORIALS


PYTHON TUTORIALS » CGI Web » Introduction »

 

Displays the current date and time in a Web browser.


import time

def printHeadertitle ):
   print """Content-type: text/html

<?xml version = "1.0" encoding = "UTF-8"?>    
<html xmlns = "http://www.w3.org/1999/xhtml">
<head><title>%s</title></head>
<body>""" % title

printHeader( "Current date and time" )
print "<paragraph>" + time.ctime( time.time() ) + "</paragraph>"
print "</body></html>"



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo CGI Web
» Introduction