Printing current time to a file

zolaris at gmail.com zolaris at gmail.com
Thu Nov 10 20:44:33 EST 2005


I am trying to print the current system time to a file.  I know only a
little bit about Python.  I have gotten the very simple:

Print time.time()

to work properly.  From what I gather the line to print it to a file
should look like:

self.log.write(time.ctime(time.time()))

But that prints nothing in the file assigned to log.  Is there
something I should be doing extra?

Thanks.




More information about the Python-list mailing list