python-deepASCII/player.py

28 строки
467 B
Python
Executable File

#! /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)
sleep(1/25)
except KeyboardInterrupt:
print('\r')
if __name__ == '__main__':
main()