Progress Bars in python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hari Sekhon

    #1

    Progress Bars in python

    Hi,
    I've written a script which backs up a huge bunch of files, but I
    don't want the script to output the file names as it does this as it
    clutters the screen, I only output errors.

    So in order to see that the script is working and not stuck, I'd like to
    implement some kind of progress bar or something, perhaps like the
    spinning thing that you often see in linux or freebsd consisting of
    switching / - \ | on the spot to get the appearance of a spinning
    bar.... I can figure out that the spinning bar is done by switching
    these four chars but I don't know how they get each char to replace the
    last one instead of printing them in succession.

    Does anybody have any good suggestions about what the best way of doing
    this or any other suggestions for the best ways to show that the script
    is processing...?


    Hari
  • Larry Bates

    #2
    Re: Progress Bars in python

    Hari Sekhon wrote:
    Hi,
    I've written a script which backs up a huge bunch of files, but I
    don't want the script to output the file names as it does this as it
    clutters the screen, I only output errors.
    >
    So in order to see that the script is working and not stuck, I'd like to
    implement some kind of progress bar or something, perhaps like the
    spinning thing that you often see in linux or freebsd consisting of
    switching / - \ | on the spot to get the appearance of a spinning
    bar.... I can figure out that the spinning bar is done by switching
    these four chars but I don't know how they get each char to replace the
    last one instead of printing them in succession.
    >
    Does anybody have any good suggestions about what the best way of doing
    this or any other suggestions for the best ways to show that the script
    is processing...?
    >
    >
    Hari
    This also is shown in Python Cookbook:



    Larry Bates

    Comment

    Working...