I have a question regarding writing text to a file. I am directing output to a logfile. During one of the loops, I have a command that will issue a message on how long it is waiting for by doing something like this
while something:
print "\rNow waiting %s seconds .. " % seconds,
sys.stdout.flush()
print "\r ",
I am trying to change my scripts so all info can be accessed via logfiles. Is there any way I can direct the output to a logfile, as above, without creating a new line for each print statement. I have tried changing the sys.stdout to the logfile in question but the print commands just force a new line for each print statement.
Any ideas would be welcome.
Cheers
Kieran
--
"Behind every great man, there is a great woman. Behind that woman is Mr.T."
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor