[SciPy-dev] adding a nice progressbar to scipy

Travis E. Oliphant oliphant@enthought....
Thu Jan 10 10:24:30 CST 2008


Ondrej Certik wrote:
> Hi,
>
> in almost all of my computational projects, I use this nice progressbar:
>
> http://pypi.python.org/pypi/progressbar/
>
> it's very easy to use:
>
>     widgets=["calculating", " ", progressbar.Percentage(), ' ',
>             progressbar.Bar(), ' ', progressbar.ETA()]
>     pbar=progressbar.ProgressBar(widgets=widgets,maxval=10000).start()
>     for i in range(10000):
>         pbar.update(i)
>         #do some heavy calculation in each step
>     pbar.finish()
>
>
> and it shows the progress, estimated time of arrival (ETA), it's
> completely configurable with
> many options, etc. I just asked the author
> and he made the code dual licensed under BSD and LGPL (the original license).
>
> Especially the ETA is very handy, because I get a clue how long I need
> to wait for my code
> to finish and I get it for free (see the above example).
>   
I tend to think that something like this might be more useful for 
IPython, or some other interactive environment.   But, I'm open to 
opinions.

-Travis O.



More information about the Scipy-dev mailing list