Пример #1
0
 public Object evaluateReader(
     LocalhostConnector connector,
     Path locator,
     FileReader reader,
     String filename,
     int lineno,
     Object security)
     throws Exception {
   ScriptContext.get().setCurrentScriptPath(Paths.get(filename));
   final PyCode code = interpreter.compile(reader, filename);
   return interpreter.eval(code);
 }
Пример #2
0
 @Override
 public void close() throws Exception {
   interpreter.close();
   scriptContext.close();
   staticContext.close();
 }