mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-28 23:15:53 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
Conflicts: scripts/demo.py src/resources/common/Opcodes.java
This commit is contained in:
@@ -95,10 +95,9 @@ public class ScriptService {
|
||||
}
|
||||
|
||||
public PyObject getMethod(String path, String module, String method) {
|
||||
PythonInterpreter interpreter = new PythonInterpreter();
|
||||
interpreter.cleanup();
|
||||
interpreter.exec("import sys\nsys.path.append('" + path + "')\nfrom " + module + " import " + method);
|
||||
PyObject func = interpreter.get(method);
|
||||
PythonInterpreter python = new PythonInterpreter();
|
||||
python.execfile(path + module + ".py");
|
||||
PyObject func = python.get(method);
|
||||
return func;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user