execnet.SshGateway API [rev. 38799]

class SshGateway(PopenCmdGateway):

This Gateway provides interaction with a remote process, established via the 'ssh' command line binary. The remote side needs to have a Python interpreter executable.

class attributes and properties:

remoteaddress:

methods:

def __init__(self, sshaddress, remotepython='python', identity=None):

instantiate a remote ssh process with the given 'sshaddress' and remotepython version. you may specify an 'identity' filepath.

def exit(self):

Try to stop all IO activity.

def join(self, joinexec=True):

Wait for all IO (and by default all execution activity) to stop.

def newchannel(self):

return new channel object.

def remote_exec(self, source, stdout=None, stderr=None):

return channel object and connect it to a remote execution thread where the given 'source' executes and has the sister 'channel' object in its global namespace. The callback functions 'stdout' and 'stderr' get called on receival of remote stdout/stderr output strings.

def __repr__(self):

return string representing gateway type and status.