Created
September 4, 2016 10:09
-
-
Save arafsheikh/4850def2d2a3d0b330549e99be4810bf to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
import sys | |
import time | |
def throbber(): | |
while True: | |
for cursor in '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏': | |
yield cursor | |
th = throbber() | |
for _ in range(50): | |
sys.stdout.write(next(th)) | |
sys.stdout.flush() | |
time.sleep(0.1) | |
sys.stdout.write('\b') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment