summaryrefslogtreecommitdiffstats
path: root/ssh.py
diff options
context:
space:
mode:
authorchocolateboy <chocolate@cpan.org>2010-09-03 15:46:25 +0100
committerAvery Pennarun <apenwarr@gmail.com>2010-09-03 23:00:26 -0700
commitee74110cffe09a0127aac68f5a29d06bf33ea7d8 (patch)
tree3f9615ced81a7f41018bf9a850c4f81e2ff0375c /ssh.py
parent5bf8687ce37dcd5bddd50fb38daaeae8c5215a9a (diff)
add option to allow the remote python binary's name/path to be specified
Diffstat (limited to 'ssh.py')
-rw-r--r--ssh.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh.py b/ssh.py
index 7a37c36..d790d4a 100644
--- a/ssh.py
+++ b/ssh.py
@@ -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