On Jan 30, 2005, at 02:18, R. Alan Monroe wrote:
print "Percent completed:" + str(percent) + "\r"
Print forces a newline. Try sys.stdout.write instead.
Alan
You can also use the following syntax:
>>> print "Percent completed:", str(percent), "\r",
The trailing comma is NOT a typo, it is intentional. It prevents print from appending a newline.
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor