From holger at merlinux.eu Wed Apr 21 16:50:02 2010 From: holger at merlinux.eu (holger krekel) Date: Wed, 21 Apr 2010 16:50:02 +0200 Subject: [execnet-dev] Problem using execnet 1.0.5 with Jython 2.5.1 on WinXP In-Reply-To: <6a56a10b1003220308y27a035e9sdec32047df79379@mail.gmail.com> References: <6a56a10b1003220308y27a035e9sdec32047df79379@mail.gmail.com> Message-ID: <20100421145001.GH26514@trillke.net> Hi Akkratat, thanks for getting back! On Mon, Mar 22, 2010 at 17:08 +0700, Akkratat Sintavarattana wrote: > 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 ! There were indeed a couple of (obscure) issues with the Jython/Windows combo. I think i fixed those now. Could you try 'easy_install' or 'pip' with the following URL: http://hudson.testrun.org/view/pytest/job/execnet-sdist/lastSuccessfulBuild/artifact/dist/execnet-1.0.6.tar.gz and report back if it becomes useable for you on Jython/Windows? I'd then see to release this as a 1.0.6 soon. cheers, holger > > 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 > 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 > =========================================================== > _______________________________________________ > execnet-dev mailing list > execnet-dev at codespeak.net > http://codespeak.net/mailman/listinfo/execnet-dev -- From phatra at gmail.com Thu Apr 22 05:28:43 2010 From: phatra at gmail.com (phatra at gmail.com) Date: Thu, 22 Apr 2010 03:28:43 +0000 Subject: [execnet-dev] Problem using execnet 1.0.5 with Jython 2.5.1 on WinXP In-Reply-To: <20100421145001.GH26514@trillke.net> Message-ID: <0016e64e568855abc20484cae8fc@google.com> Hello Holger, Thanks for the patch. The patch did solve the problem ! This is great ! ... Thanks again for this great module ... Regards, Akkratat S. === Test Code === =========================================================== import execnet code = """ import sys channel.send(sys.version) """ specs = ( r'popen//python=c:\python24\python.exe', r'popen//python=c:\python25\python.exe', r'popen//python=c:\python26\python.exe', r'popen//python=c:\jython2.5.1\jython.bat', ) 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.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] ---------------------------------------------------------------------- 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)] ---------------------------------------------------------------------- 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) [Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] ---------------------------------------------------------------------- =========================================================== On Apr 21, 2010 9:50pm, holger krekel wrote: > Hi Akkratat, > thanks for getting back! > On Mon, Mar 22, 2010 at 17:08 +0700, Akkratat Sintavarattana wrote: > > 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 ! > There were indeed a couple of (obscure) issues with the Jython/Windows > combo. > I think i fixed those now. Could you try 'easy_install' or 'pip' with the > following URL: > http://hudson.testrun.org/view/pytest/job/execnet-sdist/lastSuccessfulBuild/artifact/dist/execnet-1.0.6.tar.gz > and report back if it becomes useable for you on Jython/Windows? > I'd then see to release this as a 1.0.6 soon. > cheers, > holger > > > > 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 > > 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 > > =========================================================== > > _______________________________________________ > > execnet-dev mailing list > > execnet-dev at codespeak.net > > http://codespeak.net/mailman/listinfo/execnet-dev > -- -------------- next part -------------- An HTML attachment was scrubbed... URL: