Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
PyLucene, mail # dev - Using JCC / PyLucene with JEPP?


Copy link to this message
-
Re: Using JCC / PyLucene with JEPP?
Bill Janssen 2011-03-04, 18:40
Andi Vajda <[EMAIL PROTECTED]> 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 you like, of course.

JEPP has an interface to Python's "exec".  This avoids the overhead of
writing a Java class which is then subclassed in Python which is then
instantiated and brought out to Java again so that you can call one of
its methods.  That would be a handy thing to have in PythonVM.  I
suppose I could add it, after I get PythonVM working (this loadLibrary
thing).

Alternatively, I could use JEPP, or JEPP tweaked for JCC, if there was
some way to pass the Java VM "into" the JEPP instantiation of Python, in
such a way that that initVM() could find it.

Bill