def client_proc(job_id, rcoro, coro=None):
    # send input file to rcoro.location; this will be saved to discoro process's
    # working directory
    if (yield asyncoro.AsynCoro().send_file(rcoro.location, 'input%s.dat' % job_id,
                                            timeout=30)) < 0:
        print(rcoro.location % 'Could not send input data to %s')
        # terminate remote coro
        rcoro.send(None)
        raise StopIteration(-1)
    # send info about input
    obj = C(job_id, random.uniform(5, 8), coro)
    if (yield rcoro.deliver(obj)) != 1:
        print('Could not send input to %s' % rcoro.location)
        raise StopIteration(-1)
    # rcoro sends result to this coroutine as message
    result = yield coro.receive()
    if result < 0:
        print('Processing %s failed' % obj.i)
        raise StopIteration(-1)
    # rcoro saves results file at this client, which is saved in asyncoro's
    # dest_path, not current working directory!
    output = os.path.join(asyncoro.AsynCoro().dest_path, 'output%s.dat' % obj.i)
    # if necessary, move file to os.getcwd()
    # os.rename(output, os.getcwd())
    print('    job %s processed' % (obj.i))
dataset/ETHPy150Open pgiri/asyncoro/examples/discoro_client4.py/client_proc/swapped operands of `%`