Created
October 3, 2013 06:22
-
-
Save Y4suyuki/6805818 to your computer and use it in GitHub Desktop.
python script which print animation on console
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
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!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#heres mine
import time, sys, os
os.system("clear")
b0 = "- "
b1 = " - "
b2 = " - "
b3 = " - "
b4 = " - "
b5 = " - "
b6 = " - "
b7 = " - "
b8 = " - "
b9 = " - "
e = "˚˚˚˚˚˚˚˚˚˚TTTTTTT"
m = "▽▽▽▽▽▽▽▽▽▽_______"
for i in range(15):
time.sleep(0.1)
sys.stdout.write(
"\r (•◡•)⌐╦╦═─"
+ b0[i % len(b0)]
+ b1[i % len(b0)]
+ b2[i % len(b0)]
+ b3[i % len(b0)]
+ b4[i % len(b0)]
+ b5[i % len(b0)]
+ b6[i % len(b0)]
+ b7[i % len(b0)]
+ b8[i % len(b0)]
+ b9[i % len(b0)]
+ "("
+ e[i % len(e)]
+ m[i % len(e)]
+ e[i % len(e)]
+ ")"
)
sys.stdout.flush()
print("\n" + "You Died!".center(30, " "))