Progress Bars in python

Discussion in 'Python' started by Hari Sekhon, Jul 12, 2006.

  1. Hari Sekhon

    Hari Sekhon Guest

    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
     
    Hari Sekhon, Jul 12, 2006
    #1
    1. Advertising

  2. Hari Sekhon

    Larry Bates Guest

    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:

    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/299207

    Larry Bates
     
    Larry Bates, Jul 12, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joel Cade

    Progress Bars and Remoting

    Joel Cade, Jul 25, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    468
    Joel Cade
    Jul 25, 2003
  2. Tom Wesley

    Progress bars and cdrecord

    Tom Wesley, Oct 30, 2004, in forum: Python
    Replies:
    0
    Views:
    437
    Tom Wesley
    Oct 30, 2004
  3. Doug Helm

    CGI File Uploads and Progress Bars

    Doug Helm, Sep 8, 2005, in forum: Python
    Replies:
    1
    Views:
    373
    Diez B. Roggisch
    Sep 8, 2005
  4. Robert Brewer

    RE: CGI File Uploads and Progress Bars

    Robert Brewer, Sep 8, 2005, in forum: Python
    Replies:
    0
    Views:
    480
    Robert Brewer
    Sep 8, 2005
  5. UJ
    Replies:
    1
    Views:
    614
    John Timney \(MVP\)
    Nov 1, 2006
Loading...

Share This Page