[execnet-dev] Bug in example

cumpuleddu cumpuleddu at gmail.com
Thu Nov 28 12:24:26 CET 2013


> Could you tell exactly the line how you specified that path?
> You need to be careful with escaping on windows wrt "\" etc.
here is the full code:
import execnet
import sys


if __name__ == "__main__":

     reload(sys)
     sys.setdefaultencoding('utf-8')
     sys.path.append("C:\\execnet-1.1")
     sys.path.append("C:\\Jython25\\bin")
     print sys.path

     gw = execnet.makegateway("popen//python=jython")
     channel = gw.remote_exec("""
         from java.util import Vector
         v = Vector()
         v.add('aaa')
         v.add('bbb')
         for val in v:
             channel.send(val)
     """)

     for item in channel:
         print (item)

And Output path:
['F:\\Documenti\\Mistieru\\Programmes\\Python\\ExecTest\\ExecTest\\src', 
'C:\\Users\\Lisandru\\AppData\\Roaming\\NetBeans\\7.4', 
'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\DLLs', 
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 
'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 
'C:\\Python27\\lib\\site-packages', 
'F:\\Documenti\\Mistieru\\Programmes\\Python\\ExecTest\\ExecTest\\src', 
'C:\\execnet-1.1', 'C:\\execnet-1.1', 'C:\\Jython25\\bin']


>
>> Just for test, I tried replacing
>> gw = execnet.makegateway("popen//python=jython")
>> BY
>> gw = execnet.makegateway("popen//python=python")
>> Here, python executable is found...
> Maybe "python" in on your system wide PATH?
yes, but I added Jython too, to be sure...
> Try typing "python" and "jython" in a cmdline window.
both are working...

Thanks,
Alex
> holger





More information about the execnet-dev mailing list