Does anyone know how I can update a line of console output without creating a new line? I'm not explaning this too well, so here's an example.

When you download a file with wget, the console display looks like this:

14% [=======>                                                    ] 344,192       16.28K/s    ETA 02:19

All the figures and the progress bar get continously updated. The only way I know of sending output to the console is to use print or sys.stdout.write(), but that would give me:
14% [=======>                                                    ] 344,192       16.28K/s    ETA 02:19
18% [=========>                                               ] 344,192       16.28K/s    ETA 02:19
20% [============>                                                ] 344,192       16.28K/s    ETA 02:19

...and that's really not what I'm after!

Any help and ideas would be appreciated

Olly

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to