Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Another simple progress bar

Project description

Another simple progress bar to show the progress of a for loop iteration process in python working also for multiprocessing.

The progress bar has the following look:

[###########            ]

Installation

Installation should be straight forward:

pip install progressbar-simple

From Source

Alternativly, to get the most current version, the code can be installed from github as follows:

git clone git@github.com:vgeck/progressBar.git
cd progressBar
pip install -r requirements.txt
python setupy.py install

The last command might need sudo prefix, depending on your python setup.

Usage

Assume a for loop with 100 iterations calling the function foo:

for i in range(100):
    foo()

To monitor the process of the for loop we consider a progress bar with 10 elements for the 100 iterations. The progress bar is initialized with:

from progressbarsimple import ProgressBar

myProgressBar = ProgressBar(nElements = 10, nIterations = 100)

The progressBar is updated within the for loop with the iterator i:

myProgressBar.progress(i)

The full code for the examples is:

from progressbarsimple import ProgressBar

myProgressBar = ProgressBar(nElements = 10, nIterations = 100)
for i in range(100):
    foo()
    myProgressBar.progress(i)

For more information on how to use the progressbarsimple see the 2 example files.

Project details


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for progressbar-simple, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size progressbar_simple-0.1-py2.py3-none-any.whl (5.0 kB) File type Wheel Python version any Upload date Hashes View hashes
Filename, size progressbar-simple-0.1.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page