Skip to content

Instantly share code, notes, and snippets.

@maluta
Created March 26, 2012 13:42
Show Gist options
  • Select an option

  • Save maluta/2205106 to your computer and use it in GitHub Desktop.

Select an option

Save maluta/2205106 to your computer and use it in GitHub Desktop.
import sys
import time
s = ['|', '\\','-', '/']
for i in range(101):
time.sleep(0.1)
sys.stdout.write("\r%d%%" % i)
sys.stdout.flush()
print "\n"
for i in range(101):
time.sleep(0.1)
sys.stdout.write("\r[%c]" % s[i%4] )
sys.stdout.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment