def create_mock_ssh_script(path):
    # make this work even if $PATH or $PYTHONPATH changes
    with open(path, 'w') as f:
        f.write('#!/bin/sh\n')
        f.write('%s %s "$@"\n' % (
            pipes.quote(sys.executable),
            pipes.quote(os.path.abspath(__file__))))
    os.chmod(path, stat.S_IREAD | stat.S_IEXEC)
Dump a wrapper script to the given file object that runs this
dataset/ETHPy150Open Yelp/mrjob/tests/mockssh.py/create_mock_ssh_script