Skip to content

Instantly share code, notes, and snippets.

@89465127
Last active January 9, 2019 10:43
Show Gist options
  • Save 89465127/5468929 to your computer and use it in GitHub Desktop.
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.
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()
@89465127
Copy link
Author

@ahmed4end
Copy link

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