[Tutor] Printing a progress bar

Dave S pythontut at pusspaws.net
Sun Jun 13 04:12:47 EDT 2004


Some of the code I have written handels a lot of data, I would like to 
add a progress bar.

Initualy I tried ...

print 'Progress ',
..
loop
  ...
  print '#',
...

But it appears python does not send a line to the console until it can 
send a CR.
This has stumped me. How do I generate a progress bar without it looking 
like

Progress
#
#
#
#

Dave

PS can anyone tell me the ASCII code to move the cursor left one 
position so I can write a string of
..............................................
becoming
#########............................
as progress is made ?

Dave



More information about the Tutor mailing list