[pylucene-dev] two different JCC modules in same VM; initVM()?

Andi Vajda vajda at osafoundation.org
Thu Mar 6 21:37:27 PST 2008


On Thu, 6 Mar 2008, Bill Janssen wrote:

>> You can also get this env value by calling getVMEnv() as in:
>>
>>   >>> import foo
>>   >>> foo.initVM(foo.CLASSPATH)
>>
>>   >>> import os, foo, bar
>>   >>> bar.initVM(classpath=os.pathsep.join([foo.CLASSPATH, bar.CLASSPATH]),
>>                   env=foo.getVMEnv())
>>
>
> This gives me a type error:
>
> % python
> Python 2.5 (r25:51908, Apr 10 2007, 10:29:13)
> [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import lucene
>>>> lucene.initVM(classpath=lucene.CLASSPATH, maxheap='2000m')
> <jcc.JCCEnv object at 0xb7ed0240>
>>>> import goodstuff
>>>> goodstuff.CLASSPATH
> ''
>>>> goodstuff.initVM(classpath=lucene.CLASSPATH, maxheap='2000m', env=lucene.getVMEnv())
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> TypeError: <jcc.JCCEnv object at 0xb7ed0240>

Hmm, strange, it seems to work for me.
But I only tried it with passing the env back to lucene.
Note that env is specified, all other keywords are ignored except for 
classpath.

Andi..


More information about the pylucene-dev mailing list