Created
March 8, 2017 17:46
-
-
Save bossiernesto/96ac6faf0860c03c11f911bbbc374575 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 sys | |
| import time | |
| import itertools | |
| def spinning_cursor(): | |
| while True: | |
| for cursor in '|/-\\': | |
| yield cursor | |
| #spinner = spinning_cursor() | |
| spinner = itertools.cycle(['-','/','|','\\']) | |
| for _ in range(50): | |
| sys.stdout.write(next(spinner)) | |
| 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