Commit 8d95228c authored by ale's avatar ale

renamed to to avoid conflict with python stdlib

parent f7603876
def read_file(path):
with open(path, 'rb') as fd:
for line in fd:
line = unicode(line, 'utf-8', 'replace')
except UnicodeDecodeError:
yield line.rstrip('\n')
def read_fifo(fifo_path):
while True:
for line in read_file(fifo_path):
yield line
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment