Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Andi Vajda
On Fri, 4 Mar 2011, Bill Janssen wrote: Andi Vajda wrote: Something's off. libjcc.so is not shown in your list. You need to solve that mystery before embedding can proceed. So, I went to my Mac, and looked for libjcc.dylib. Sure enough, it's there. So I tried this simple program: import

Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Bill Janssen
Andi Vajda wrote: > Something's off. libjcc.so is not shown in your list. > You need to solve that mystery before embedding can proceed. So, I went to my Mac, and looked for libjcc.dylib. Sure enough, it's there. So I tried this simple program: import org.apache.jcc.PythonVM; public class te

Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Andi Vajda
On Fri, 4 Mar 2011, Bill Janssen wrote: Andi Vajda wrote: On Mar 4, 2011, at 10:56, Bill Janssen wrote: Andi Vajda wrote: There are two shared libraries for jcc: _jcc.so, the python extension, and libjcc.so, the shared mode runtime shared library. That's the one that gets loaded by Pyt

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Andi Vajda
On Fri, 4 Mar 2011, Bill Janssen wrote: Andi Vajda wrote: If JEPP execs python, then that Python VM runs in a subprocess of the It's not Java's Runtime.exec(), it's Python's built-in function, "exec". So the Python VM is running in the same address space as Java. Ok, so how is JEPP doing

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Bill Janssen
Andi Vajda wrote: > >> If JEPP execs python, then that Python VM runs in a subprocess of the > > > > It's not Java's Runtime.exec(), it's Python's built-in function, "exec". > > So the Python VM is running in the same address space as Java. > > Ok, so how is JEPP doing this from Tomcat without

Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Bill Janssen
Andi Vajda wrote: > On Mar 4, 2011, at 10:56, Bill Janssen wrote: > > > Andi Vajda wrote: > > > >> There are two shared libraries for jcc: _jcc.so, the python extension, > >> and libjcc.so, the shared mode runtime shared library. That's the one > >> that gets loaded by PythonVM.java. Its dire

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Andi Vajda
On Mar 4, 2011, at 11:34, Bill Janssen wrote: > Andi Vajda wrote: > >> >> On Fri, 4 Mar 2011, Bill Janssen wrote: >> >>> Andi Vajda wrote: >>> > Or if I need to run the same Python program multiple times? There is no notion of python program in this context (no __main__

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Bill Janssen
Andi Vajda wrote: > > On Fri, 4 Mar 2011, Bill Janssen wrote: > > > Andi Vajda wrote: > > > >>> Or if I need to run the same Python program multiple times? > >> > >> There is no notion of python program in this context (no > >> __main__). You import a module, instantiate a class from it and in

Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Andi Vajda
On Mar 4, 2011, at 10:56, Bill Janssen wrote: > Andi Vajda wrote: > >> There are two shared libraries for jcc: _jcc.so, the python extension, >> and libjcc.so, the shared mode runtime shared library. That's the one >> that gets loaded by PythonVM.java. Its directory must be on java's >> java.l

Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Bill Janssen
Andi Vajda wrote: > There are two shared libraries for jcc: _jcc.so, the python extension, > and libjcc.so, the shared mode runtime shared library. That's the one > that gets loaded by PythonVM.java. Its directory must be on java's > java.library.path. No such beast gets built or installed: % f

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Andi Vajda
On Fri, 4 Mar 2011, Bill Janssen wrote: Andi Vajda wrote: Or if I need to run the same Python program multiple times? There is no notion of python program in this context (no __main__). You import a module, instantiate a class from it and invoke its methods. You can import and instantiate

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Bill Janssen
Andi Vajda wrote: > > Or if I need to run the same Python program multiple times? > > There is no notion of python program in this context (no > __main__). You import a module, instantiate a class from it and invoke > its methods. You can import and instantiate as many classes and > modules as y

Re: using org.apache.jcc.PythonVM

2011-03-04 Thread Andi Vajda
On Fri, 4 Mar 2011, Bill Janssen wrote: Hmmm, having this difficulty: % find /usr/local/lib/python2.6 -name \*jcc\* /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/libjcc.a /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc /usr/local/lib/python2.6/

using org.apache.jcc.PythonVM

2011-03-04 Thread Bill Janssen
Hmmm, having this difficulty: % find /usr/local/lib/python2.6 -name \*jcc\* /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/libjcc.a /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg/jcc /usr/local/lib/python2.6/dist-packages/JCC-2.7-py2.6-linux-x86_64.egg

Re: Using JCC / PyLucene with JEPP?

2011-03-04 Thread Roman Chyla
Yes, and I can say it is working extremely well so far - we have done and are doing some extensive benchmarking and tests. I also use multiprocessing inside (python2.6) and I hope I would be able to publish the source code soon, it could be re-usable. If you are interested before that happens, plea