more reasonable starting point although this code is screwed and needs serious work
git-svn-id: http://google-refine.googlecode.com/svn/trunk@900 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
parent
07b1665749
commit
27a8e8db6e
@ -15,15 +15,16 @@ import org.python.core.PyString;
|
|||||||
import org.python.util.PythonInterpreter;
|
import org.python.util.PythonInterpreter;
|
||||||
|
|
||||||
public class JythonEvaluable implements Evaluable {
|
public class JythonEvaluable implements Evaluable {
|
||||||
|
|
||||||
private static final String s_functionName = "___temp___";
|
private static final String s_functionName = "___temp___";
|
||||||
|
|
||||||
private static PythonInterpreter _engine;
|
private static PythonInterpreter _engine;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
File libPath = new File("lib/jython");
|
File libPath = new File("webapp/WEB-INF/lib/jython");
|
||||||
if (libPath.exists()) {
|
if (libPath.exists()) {
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
props.setProperty("python.path", libPath.getAbsolutePath());
|
props.setProperty("python.path", libPath.getAbsolutePath());
|
||||||
|
|
||||||
PythonInterpreter.initialize(System.getProperties(), props, new String[] { "" });
|
PythonInterpreter.initialize(System.getProperties(), props, new String[] { "" });
|
||||||
}
|
}
|
||||||
_engine = new PythonInterpreter();
|
_engine = new PythonInterpreter();
|
||||||
|
Loading…
Reference in New Issue
Block a user