Created
September 9, 2018 19:56
-
-
Save jb0hn/68e7452740155199d90e1e2499e96d40 to your computer and use it in GitHub Desktop.
Simple progress bar (CLI)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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