| 39 |
| 40 |
| 41 |
| 42 |
| 43 |
| 44 |
| 45 |
| 46 |
| 47 |
| 48 |
| 49 |
| 50 |
| 51 |
| 52 |
| 53 |
| 54 |
| 55 |
| 56 |
| 57 |
| 58 |
| 59 | |
def initgateway(self, python="python"): |
if self.hostname == "localhost": |
self.gw = py.execnet.PopenGateway(python=python) |
else: |
self.gw = py.execnet.SshGateway(self.hostname, |
remotepython=python) |
if self.inplacelocal: |
self.gw.remote_exec(py.code.Source( |
-> sethomedir, "sethomedir()" |
)).waitclose() |
self.gw_remotepath = None |
else: |
assert self.relpath |
channel = self.gw.remote_exec(py.code.Source( |
gethomedir, |
sethomedir, "sethomedir()", |
getpath_relto_home, """ |
channel.send(getpath_relto_home(%r)) |
""" % self.relpath, |
)) |
self.gw_remotepath = channel.receive() | |