def enqueue_output(out, queue):
    for line in iter(out.readline, b''):
        queue.put(line.strip().decode('utf-8'))
    out.close()
A utility method for consuming piped output from a subprocess.
dataset/ETHPy150Open pybee/cricket/cricket/executor.py/enqueue_output