blob: db7c3474a6d894d5bff7d078cd64f13be96d63fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# From C. Scott Ananian
# both of these functions should be in the 'basic' package or some such
def clear_scr():
print '\x1B[H\x1B[J' # clear screen, the hard way.
def wait():
import time
time.sleep(0.1)
# jumping man!
# having to escape the backslash is rather unfortunate
# i didn't have to do that in C64 BASIC
for i in xrange(0,50):
clear_scr()
print "\\o/"
print "_|_"
print " "
wait()
clear_scr()
print "_o_"
print " | "
print "/ \\"
wait()
clear_scr()
print " o "
print "/|\\"
print "| |"
wait()
clear_scr()
print "_o_"
print " | "
print "/ \\"
wait()
|