Python/Curses 200 194 182 121 117
Assumes file is in working directory andthe file name is stored in variable f
.
from curses import*;importimport time;s=initscr();F=file.read(file(f)).split('\n');y=0time,os
while 1:
for i in F:
s.addstr(y,0,i);s.refresh();y+=1
if i=='':y=0;s.clear();time.sleep(1)
Or, down to 121 when not using curses
import time,os;F=filefile.read(file(f)).split('\n')
while 1:
for i in F:
print i
if i=='':time.sleep(1);os.system('cls')
Note: replace 'cls'
with 'clear'
if noon a unix based system, adding 2 chrs.
ctl+C
to quit
Edit: Changed the filename method, now uses a variable (-6chrs)
Edit: Changed the for
to iterate through the list F
- Thanks ace (-12chrs)