[execnet-dev] Problem using execnet 1.0.5 with Jython 2.5.1 on WinXP

Akkratat Sintavarattana phatra at gmail.com
Mon Mar 22 11:08:36 CET 2010


Hello,

I have problem using execnet 1.0.5 to execute the code within Jython 2.5.1
on WinXP platform. I wonder whether anyone experience the same problem. I
include the simple test program below with it's output. Initially, I tried
to fixed this myself without success. I thought it might be the problem with
the Jython and not execnet. But since the documentation states that it's
tested with Jython 2.5.1, I guess it work on platforms other than Windows.
Has anyone gotten this to work Windows?

If you want me to help test the experimented code or something, I'm willing
to help. This is a very useful and powerful library !

Thanks for creating this.


Akkratat S.


=== Test Code ===
===========================================================
import execnet

code = """
import sys
channel.send(sys.version)
"""
specs = (
    r'popen//python=c:\python25\python.exe',
    r'popen//python=c:\python26\python.exe',
    r'popen//python=jython.bat',
)
# my jython is in c:\jython2.5.1, which is set in PATH

for spec in specs:
    gw = execnet.makegateway(spec)
    ch = gw.remote_exec(code)
    print ch.receive()
    print '-' * 70
===========================================================

=== Output ===
===========================================================
C:\temp>c:\python26\python.exe test_remote.py
2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)]
----------------------------------------------------------------------
2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)]
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_remote.py", line 14, in <module>
    gw = execnet.makegateway(spec)
  File
"c:\python26\lib\site-packages\execnet-1.0.5-py2.6.egg\execnet\multi.py", line
77, in makegateway
    gw = gateway.PopenGateway(python=spec.python, id=id)
  File
"c:\python26\lib\site-packages\execnet-1.0.5-py2.6.egg\execnet\gateway.py",
line 157, in __init__
    super(PopenGateway, self).__init__(args, id=id)
  File
"c:\python26\lib\site-packages\execnet-1.0.5-py2.6.egg\execnet\gateway.py",
line 139, in __init__
    super(PopenCmdGateway, self).__init__(io=io, id=id)
  File
"c:\python26\lib\site-packages\execnet-1.0.5-py2.6.egg\execnet\gateway.py",
line 18, in __init__
    self._remote_bootstrap_gateway(io)
  File
"c:\python26\lib\site-packages\execnet-1.0.5-py2.6.egg\execnet\gateway.py",
line 170, in _remote_bootstrap_gateway
    s = io.read(1)
  File
"c:\python26\lib\site-packages\execnet-1.0.5-py2.6.egg\execnet\gateway_base.py",
line 86, in read
    raise EOFError("expected %d bytes, got %d" %(numbytes, len(buf)))
EOFError: expected 1 bytes, got 0
===========================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/execnet-dev/attachments/20100322/a6ca4355/attachment.html>


More information about the execnet-dev mailing list