/usr/lib/python2.7/dist-packages/lucene/__init__.py is in pylucene 2.3.1-1.1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import os, _lucene
__dir__ = os.path.abspath(os.path.dirname(__file__))
class JavaError(Exception):
def getJavaException(self):
return self.args[0]
def __str__(self):
writer = StringWriter()
self.getJavaException().printStackTrace(PrintWriter(writer))
return "\n".join((super(JavaError, self).__str__(), " Java stacktrace:", str(writer)))
class InvalidArgsError(Exception):
pass
_lucene._set_exception_types(JavaError, InvalidArgsError)
VERSION = "2.3.1"
CLASSPATH = [os.path.join(__dir__, "lucene-core-2.3.1.jar"), os.path.join(__dir__, "lucene-snowball-2.3.1.jar"), os.path.join(__dir__, "lucene-highlighter-2.3.1.jar"), os.path.join(__dir__, "lucene-analyzers-2.3.1.jar"), os.path.join(__dir__, "lucene-regex-2.3.1.jar"), os.path.join(__dir__, "lucene-queries-2.3.1.jar"), os.path.join(__dir__, "extensions.jar")]
CLASSPATH = os.pathsep.join(CLASSPATH)
_lucene.CLASSPATH = CLASSPATH
_lucene._set_function_self(_lucene.initVM, _lucene)
from _lucene import *
|