Skip to content

Instantly share code, notes, and snippets.

@jb0hn
Created September 9, 2018 19:56
Show Gist options
  • Save jb0hn/68e7452740155199d90e1e2499e96d40 to your computer and use it in GitHub Desktop.
Save jb0hn/68e7452740155199d90e1e2499e96d40 to your computer and use it in GitHub Desktop.
Simple progress bar (CLI)
#import modules
import sys
import time
for i in range(100):
progress = i+1
sys.stdout.write("Download progress: %d%% \r" % (progress) )
sys.stdout.flush()
time.sleep(0.01)
print("\nFinished.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment