|
|
@@ -25,7 +25,7 @@ public class PythonParse implements ScriptParse {
|
|
|
private PyFunction pyFunction;
|
|
|
private String script=null;
|
|
|
|
|
|
- public PythonParse() {
|
|
|
+ static {
|
|
|
Properties props = new Properties();
|
|
|
props.setProperty("python.console.encoding", "UTF-8");
|
|
|
props.put("python.home", "jython-standalone-2.7.1.jar");
|
|
|
@@ -35,13 +35,11 @@ public class PythonParse implements ScriptParse {
|
|
|
Properties preprops = System.getProperties();
|
|
|
PythonInterpreter.initialize(preprops, props, new String[0]);
|
|
|
PySystemState systemState = Py.getSystemState();
|
|
|
-// PyString standalone = new PyString("\\python-modules\\Lib");
|
|
|
-// PyString xml = new PyString("E:\\software\\coffee-boot\\coffee-admin\\src\\main\\resources\\python");
|
|
|
-// systemState.path.append(standalone);
|
|
|
log.info("python path >>>>>>>>>>>>>>>>>:{}",systemState.path);
|
|
|
PythonInterpreter.initialize(System.getProperties(), props, new String[] {});
|
|
|
+ }
|
|
|
+ public PythonParse() {
|
|
|
interpreter = new PythonInterpreter();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|