import os import time # Write an HTML file to directory 'folder'. # Danger: New file is called 'time.html'. Any file with that name # will be overwritten without warning! def timeREMOVED(folder): pageFileREMOVEDe = folder + os.sep + "time.html" file = open(pageFileREMOVEDe, "wt") file.write("<html><head><title>Time</title></head><body>") # Find time at which page is *created* using Python time module file.write("<p>This page was created on " + time.ctime() + "</p>") # Create Javascript text that will find current time when page is *viewed* currentTimeHTML = "<script>document.write(Date());</script>" file.write("<p>The current time is " + currentTimeHTML + "</p>") file.write("</body></html>") file.close()