[py-dev] execnet hangs
Armin Rigo
arigo at tunes.org
Thu Apr 7 13:32:41 MEST 2005
Hi,
I'm having a hard time debugging the following example, which just hangs on
the very last receive(). On the remote site, the CHANNEL_DATA message from
the last send() shows up in the debug log, but it doesn't get passed to my
'for' loop...
Armin
-+-
import py
code = py.code.Source(
"""
for name, args in channel:
channel.send(1)
""")
gw = py.execnet.SshGateway('codespeak.net')
def do(c, name, *args):
c.send((name, args))
obj = c.receive()
print obj
return obj
c1 = gw.remote_exec(code)
do(c1, 'stat', '/.')
c2 = gw.remote_exec(code)
do(c2, 'readdir', '/')
c3 = gw.remote_exec(code)
do(c3, 'readdir', '/home')
More information about the py-dev
mailing list