Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (38 sloc) 1.554 kb
some deprecated calls
(c) 2008-2009, Holger Krekel and others
import execnet
def PopenGateway(python=None):
""" instantiate a gateway to a subprocess
started with the given 'python' executable.
APIWARN("1.0.0b4", "use makegateway('popen')")
spec = execnet.XSpec("popen")
spec.python = python
return execnet.default_group.makegateway(spec)
def SocketGateway(host, port):
""" This Gateway provides interaction with a remote process
by connecting to a specified socket. On the remote
side you need to manually start a small script
(py/execnet/script/ that accepts
SocketGateway connections or use the experimental
new_remote() method on existing gateways.
APIWARN("1.0.0b4", "use makegateway('socket=host:port')")
spec = execnet.XSpec("socket=%s:%s" %(host, port))
return execnet.default_group.makegateway(spec)
def SshGateway(sshaddress, remotepython=None, ssh_config=None):
""" instantiate a remote ssh process with the
given 'sshaddress' and remotepython version.
you may specify an ssh_config file.
APIWARN("1.0.0b4", "use makegateway('ssh=host')")
spec = execnet.XSpec("ssh=%s" % sshaddress)
spec.python = remotepython
spec.ssh_config = ssh_config
return execnet.default_group.makegateway(spec)
def APIWARN(version, msg, stacklevel=3):
import warnings
Warn = DeprecationWarning("(since version %s) %s" %(version, msg))
warnings.warn(Warn, stacklevel=stacklevel)
Jump to Line
Something went wrong with that request. Please try again.