python-deepASCII/player.py

28 lines
467 B
Python
Raw Normal View History

2017-09-27 21:09:29 +02:00
#! /usr/bin/env python3
# Credits: Vuk Cosic - Deep ASCII - 1998
from time import sleep
def main():
with open('deep.throat') as f:
content = f.read()
frames = content.split('[2K')[1:]
try:
print('\n' * 100)
for i,frame in enumerate(frames):
print(frame[:-4], flush=True)
print('>', i)
2017-09-27 21:09:29 +02:00
sleep(1/25)
except KeyboardInterrupt:
print('\r')
if __name__ == '__main__':
main()