Skip to content

Instantly share code, notes, and snippets.

@arafsheikh
Created September 4, 2016 10:09
Show Gist options
  • Save arafsheikh/4850def2d2a3d0b330549e99be4810bf to your computer and use it in GitHub Desktop.
Save arafsheikh/4850def2d2a3d0b330549e99be4810bf to your computer and use it in GitHub Desktop.
#!/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