mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
some stuff I forgot to commit
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