def gen():
    while True:
        frame = get_frame()
        (yield ((b'--frame\r\nContent-Type: image/jpeg\r\n\r\n' + frame) + b'\r\n\r\n'))
def gen():
    while True:
        frame = get_frame()
        (yield ((b'--frame\r\nContent-Type: image/jpeg\r\n\r\n' + frame) + b'\r\n\r\n'))