Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import time
- import os
- from os import system
- def up():
- sys.stdout.write("\033[F")
- def down():
- sys.stdout.write("\033[E")
- def bofl():
- sys.stdout.write("\r")
- def clear():
- os.system('clear')
- def printChar(c):
- sys.stdout.write('\b') #Write a backspace
- sys.stdout.write(c)
- sys.stdout.flush() #force the print NOW (before the next print)
- time.sleep(.1)
- def printGun():
- sys.stdout.write(' __,_____\n')
- sys.stdout.write(' / __.==--"\n')
- sys.stdout.write(' /#(-\n')
- sys.stdout.write(' `-\'\n')
- def shoot(x):
- up()
- up()
- up()
- for n in range (1,x):
- sys.stdout.write(' / __.==--"' + ' '*n + '*\n')
- up()
- time.sleep(.1)
- down()
- down()
- down()
- clear()
- printGun()
- shoot(25)
- chars = ["|", "/", "-", "\\"]
- for x in range (1,100):
- for c in chars:
- printChar(c)
- #sys.stdout.write('\b ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement