Re: Printing current time to a file

2005-11-10 Thread Peter Hansen
[EMAIL PROTECTED] wrote: > 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.

Re: Printing current time to a file

2005-11-10 Thread skip
zolaris> self.log.write(time.ctime(time.time())) zolaris> But that prints nothing in the file assigned to log. Is there zolaris> something I should be doing extra? There's no newline in there. You probably need to flush the file: self.log.write(time.ctime(time.time())) self

Printing current time to a file

2005-11-10 Thread zolaris
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 nothin