|
[php]
#!/usr/bin/python
#Filename:splash.py
import time,random,sys,os
#splashA = ('a','b','c','d','e','f','g')
#splashB = ('-','\\','|','/')
def splash(splash,step = 2,interval = 0.2,times = 25):
"splash is a (), step could be 1,2 or 3, interval is a float number for seconds"
j = 0
for i in range(times):
print splash[j],
j += 1
j %= len(splash)
print '\b'*step,
sys.stdout.flush()
time.sleep(interval)
#splash(splashB,step = 2)
[/php] |
|