Skip to content

Instantly share code, notes, and snippets.

@upsuper
Created June 10, 2013 05:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save upsuper/5746787 to your computer and use it in GitHub Desktop.
Save upsuper/5746787 to your computer and use it in GitHub Desktop.
Graphic progress indicator in command line. It may only support OS X.
#!/usr/bin/python
# - * - coding: UTF-8 - * -
from sys import stdout
from time import sleep
from itertools import cycle
MOON = [u'\U0001F311', u'\U0001F312', u'\U0001F313', u'\U0001F314',
u'\U0001F315', u'\U0001F316', u'\U0001F317', u'\U0001F318']
for i in cycle(range(len(MOON))):
stdout.write('\r' + MOON[i] + ' ')
stdout.flush()
sleep(0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment