Skip to content

Instantly share code, notes, and snippets.

@spac3unit
Forked from 89465127/cli_progress.py
Created June 20, 2018 01:07
Show Gist options
  • Select an option

  • Save spac3unit/197f8515842a8370eb679a68b453f058 to your computer and use it in GitHub Desktop.

Select an option

Save spac3unit/197f8515842a8370eb679a68b453f058 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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment