Skip to content

Instantly share code, notes, and snippets.

@szastupov
Created June 11, 2015 23:56
Show Gist options
  • Save szastupov/318876342258d2c5a939 to your computer and use it in GitHub Desktop.
Save szastupov/318876342258d2c5a939 to your computer and use it in GitHub Desktop.
Simple python progress bar
def progress(perc):
bar = "\r[{0:<50}] {1}%".format("=" * int(perc/2), perc)
sys.stdout.write(bar)
sys.stdout.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment