def getLines():
with open('/var/log/syslog', 'rb') as f:
while True:
line = f.readline()
if line:
yield line
else:
raise StopIterationI know the problem lies with the StopIteration, but I'm not sure how to tell the caller that there are no more lines for now.
-- Bill -- http://mail.python.org/mailman/listinfo/python-list
