Skip to content

Instantly share code, notes, and snippets.

@Y4suyuki
Created October 3, 2013 06:22
Show Gist options
  • Save Y4suyuki/6805818 to your computer and use it in GitHub Desktop.
Save Y4suyuki/6805818 to your computer and use it in GitHub Desktop.
python script which print animation on console
import time
import sys
animation = "|/-\\"
for i in range(100):
time.sleep(0.1)
sys.stdout.write("\r" + animation[i % len(animation)])
sys.stdout.flush()
print "End!"
@GuySky
Copy link

GuySky commented Feb 26, 2023

Thanks! Was really helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment