Last active
January 9, 2019 10:43
-
-
Save 89465127/5468929 to your computer and use it in GitHub Desktop.
Simple example of how to get a python progress bar in your program.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from progress.bar import Bar # sudo pip install progress | |
bar = Bar('Processing', max=20, suffix='%(index)d/%(max)d - %(percent).1f%% - %(eta)ds') | |
for i in range(20): | |
time.sleep(.05) # Do some work | |
bar.next() | |
bar.finish() |
how can i change the index number ?
in the part > '%(index)d/%(max)d
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://pypi.python.org/pypi/progress/