[py-svn] r37647 - py/trunk/py/doc
hpk at codespeak.net
hpk at codespeak.net
Wed Jan 31 00:46:21 CET 2007
Author: hpk
Date: Wed Jan 31 00:46:20 2007
New Revision: 37647
Modified:
py/trunk/py/doc/execnet.txt
Log:
make the example independent from the installed python binaries
Modified: py/trunk/py/doc/execnet.txt
==============================================================================
--- py/trunk/py/doc/execnet.txt (original)
+++ py/trunk/py/doc/execnet.txt Wed Jan 31 00:46:20 2007
@@ -85,11 +85,14 @@
an example:
>>> import py
- >>> gw = py.execnet.PopenGateway(python="python2.3")
- >>> channel = gw.remote_exec("import sys ; channel.send(sys.version_info)")
- >>> channel.receive()[:2]
- (2, 3)
- >>> gw.exit()
+ >>> gw = py.execnet.PopenGateway()
+ >>> channel = gw.remote_exec("""
+ ... import os
+ ... channel.send(os.getpid())
+ ... """)
+ >>> remote_pid = channel.receive()
+ >>> remote_pid != py.std.os.getpid()
+ True
`remote_exec` implements the idea to ``determine
protocol and remote code from the client/local side``.
More information about the pytest-commit
mailing list