Re: JPype and classpath (Was Re: embedding jython in CPython... )

2005-01-23 Thread Steve Menard
[EMAIL PROTECTED] wrote: Thanks for the response. However, I continue to have problems. Allow me to give some more detail. For simplicity of testing, I hard coded the classpath and JVM path (BTW getDefaultJVMPath() returns None on my system) import os, os.path from jpype import * startJVM("C:/jdk1.

Re: JPype and classpath (Was Re: embedding jython in CPython... )

2005-01-23 Thread johng2001
Thanks for the response. However, I continue to have problems. Allow me to give some more detail. For simplicity of testing, I hard coded the classpath and JVM path (BTW getDefaultJVMPath() returns None on my system) import os, os.path from jpype import * startJVM("C:/jdk1.5.0/jre/bin/client/jvm

Re: embedding jython in CPython...

2005-01-22 Thread Jim Hargrave
> I am curious to know what makes your Jython code incompatible with > CPython. If it is only because it uses Java classes, it might > not be too > difficult to port them to CPython+Jpype. CPython+Jpype may indeed be the way to go in the long run - it's only my ignorance stoping me at this point :

Re: embedding jython in CPython...

2005-01-22 Thread Steve Menard
Jim Hargrave wrote: Sorry - should have given more detail. That's what I get for posting at 1:00AM. What I want to do us write scripts in CPython that access Windows ActiveX such as Word and IE. Obviously Jython can't do this (easily at least). I also have Jython scripts that provide a high le

JPype and classpath (Was Re: embedding jython in CPython... )

2005-01-22 Thread Steve Menard
While we are on topic, I am having some trouble understanding JPype classpath. How do I init the JVM with the folder in which the Python program is located included in the classpath? I tried t = JPackage('.').test That did not work. My environment variable includes current folder in the classpath I

Re: embedding jython in CPython...

2005-01-22 Thread Jim Hargrave
Sorry - should have given more detail. That's what I get for posting at 1:00AM. What I want to do us write scripts in CPython that access Windows ActiveX such as Word and IE. Obviously Jython can't do this (easily at least). I also have Jython scripts that provide a high level layer on top of

Re: embedding jython in CPython...

2005-01-22 Thread johng2001
> As for using JPype ... well it depends on what you want to script. if > you Java code is the main app, I'd eschew CPython completely and use > Jython to script. If you main app is in Python, and the Java code is > "simply" libraries you wish to use, then I'f go with CPython + Jpype. It > is very

Re: embedding jython in CPython...

2005-01-22 Thread Steve Menard
Jim Hargrave wrote: I've read that it is possible to compile jython to native code using GCJ. PyLucene uses this approach, they then use SWIG to create a Python wrapper around the natively compiled (java) Lucene. Has this been done before for with jython? Another approach would be to use JPype