lmr/autotest — comment on commit ff84d29af498167d3a5bae0817206b50ba623464
File: client/bin/autotestd_monitor line 39
By dalecurtis:

You could use select, although it doesn't work on windows:

def tail(file):
fds = [open(file)]
while not _thread_termination_event.isSet():
reads, _, _ = select.select(fds, [], [])
if reads:
line = reads[0].readline()
if line:
yield line
else:
time.sleep(0.1)

Sadly, select doesn't work exactly right here as it will always return read okay, so we need the time.sleep()