473,396 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jul 12 '06 #1
1 1618
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/Coo.../Recipe/299207

Larry Bates
Jul 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Paul | last post by:
i have been working with vb6 for a while but never had the pleasure of using progress bars. That is until now, one of the programs i have written has just been modified so that large csv files of...
2
by: flamesrock | last post by:
Certain web applications, everything from wget to downloader for X has this nifty feature I'd like to accomplish in python. Its the progress bar/time elapsed/time remaining scheme Filename |...
0
by: Martin Platt | last post by:
Hi, I'm looking into various options for a fairly simple backup utility for our application. I have no problems being able to backup, find restorable backup files, and restore then. What I'd...
1
by: Xarky | last post by:
Hi, I am trying to use progress bars, where the progress is seen as vertical. I am succeding to manage progess bars, where progress is increasing horizontally, but not vertically. Can someone...
6
by: Kyle | last post by:
I want to do a single pix update bar instead of the big block that progress bars usually use. I can't seem to find any info on how to do this. Thanks in advance for any help, Kyle
2
by: Robert Smith | last post by:
Hello, I have a problem with my progress bar, as shown in the attached code, the values on the bar are incremented within a threaded timer event. The timer works fine and ticks all the way...
5
by: Keith Rebello | last post by:
I have a couple of progress bars that indicate the progress of a math-intensive application. They are working well. The only problem is that the progress indicator is gray in color. Is it...
0
by: Ritesh Raj Sarraf | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, In urllib.urlretrieve I can use reporthook to implement a progress bar. But in urllib2.urlopen I can't. I have to use urllib2.urlopen...
3
by: Ritesh Raj Sarraf | last post by:
Hi, I have a small application, written in Python, that uses threads. The application uses function foo() to download files from the web. As it reads data from the web server, it runs a progress...
3
by: tubby | last post by:
Hi guys, I have a Python script that I've prettied-up for Windows users by adding things like shell.SHBrowseForFolder and win32gui.MessageBox, etc. In short, it looks like this: 1. Pretty...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.