Skip to content

Instantly share code, notes, and snippets.

@StarJade-Park
Last active July 9, 2017 04:06
Show Gist options
  • Save StarJade-Park/aa3fbfe1b75ad08cc27334b44fc28b28 to your computer and use it in GitHub Desktop.
Save StarJade-Park/aa3fbfe1b75ad08cc27334b44fc28b28 to your computer and use it in GitHub Desktop.
[py3-progressbar] python3 progressbar simple example #python3 #py3-progressbar
# Output example
# Running: 100% [######################################################] 10 of 10
from progressbar import ProgressBar, Percentage, Bar, SimpleProgress
widgets = ['Running: ', Percentage(), ' ',
Bar(marker='#', left='[', right=']'),
' ', SimpleProgress()]
pbar = ProgressBar(widgets=widgets, maxval=rangeOfFile.__len__()).start()
for i in YOUR_LIST:
# working code in here
pbar.update(i)
pbar.finish()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment