lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <>
Subject Re: Using JCC / PyLucene with JEPP?
Date Fri, 04 Mar 2011 20:33:47 GMT

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 this from Tomcat without patching the Tomcat
>> startup code so that the PythonVM is initialized in the main thread ?
> I don't know that it is.  What I'm interested in doing is starting a
> Python interpreter in Java, then occasionally calling into it to exec
> some Python code.

I see. Look at the PythonVM.instantiate() method. It's the one that does the 
python equivalent of "from module import blah; blah()".
You could add another method there that does an exec or eval instead.


View raw message