Last active
November 3, 2016 05:35
-
-
Save morishin/9f1ec091714457f0e253 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
from __future__ import print_function | |
import sys | |
def spinner_gen(): | |
while 1: | |
yield '|' | |
yield '/' | |
yield '-' | |
yield '\\' | |
if __name__ == '__main__': | |
for spinner in spinner_gen(): | |
print(spinner + '\033[1D', end='', file=sys.stderr) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment