diff options
author | chocolateboy <chocolate@cpan.org> | 2010-09-03 15:46:25 +0100 |
---|---|---|
committer | Avery Pennarun <apenwarr@gmail.com> | 2010-09-03 23:00:26 -0700 |
commit | ee74110cffe09a0127aac68f5a29d06bf33ea7d8 (patch) | |
tree | 3f9615ced81a7f41018bf9a850c4f81e2ff0375c /ssh.py | |
parent | 5bf8687ce37dcd5bddd50fb38daaeae8c5215a9a (diff) |
add option to allow the remote python binary's name/path to be specified
Diffstat (limited to 'ssh.py')
-rw-r--r-- | ssh.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -19,7 +19,7 @@ def empackage(z, filename): return '%s\n%d\n%s' % (filename,len(content), content) -def connect(rhostport): +def connect(rhostport, python): main_exe = sys.argv[0] l = (rhostport or '').split(':', 1) rhost = l[0] @@ -48,9 +48,9 @@ def connect(rhostport): if not rhost: - argv = ['python', '-c', pyscript] + argv = [python, '-c', pyscript] else: - argv = ['ssh'] + portl + [rhost, '--', "python -c '%s'" % pyscript] + argv = ['ssh'] + portl + [rhost, '--', "'%s' -c '%s'" % (python, pyscript)] (s1,s2) = socket.socketpair() def setup(): # runs in the child process |