def copy_file(s, d, xform=None):
    with open(s, 'rb') as f:
        text = f.read()
    if xform:
        (d, text) = xform(d, text)
    if os.path.exists(d):
        if opts.force:
            print >> sys.stderr, 'Overwriting %s.' % d
        else:
            print >> sys.stderr, d % 'Not overwriting %s.'
            return
    else:
        print >> sys.stderr, 'Writing %s.' % d

    with open(d, 'wb') as f:
        f.write(text)
dataset/ETHPy150Open jdf/processing.py/buildtime/py/pde2py.py/copy_file/swapped operands of `%`