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 python | |
import sys | |
import time | |
def uchar(code): | |
return ('\\U%08x' % code).decode('unicode-escape') | |
start = 0x1F550 | |
end = 0x1F55B | |
emoji = map(uchar, range(start, end + 1)) | |
def spin(): | |
while True: | |
for moji in emoji: | |
sys.stdout.write(moji) | |
sys.stdout.write(' ') | |
sys.stdout.flush() | |
time.sleep(0.1) | |
sys.stdout.write('\r') | |
try: | |
spin() | |
except KeyboardInterrupt: | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment