[Tutor] carriage return on windows
Bill Kranec
billk at fastmail.fm
Sun Jan 30 03:04:56 CET 2005
Hello,
I'm trying to have a loop in a program print a message so I know it's
status. Right now I'm using
print "Percent completed:" + str(percent) + "\r"
Which should send me back to the beginning of the line and overwrite it
with a new line. But instead I get:
Percent completed: 50
Percent completed: 51
Percent completed: 52
Percent completed: 53
and so on. Am I using this wrong, and if so, what is the right way to
implement something like this?
Thanks for any help!
Bill
More information about the Tutor
mailing list