public static void runPythonScript(final String script,final List<Pair<String,Object>> bindings) throws ScriptException {
  final ScriptEngine engine=manager.getEngineByName("python");
  runScript(engine,script,bindings);
}

public static void runPythonScript ( final String script , final List < Pair < String , Object > > bindings ) throws ScriptException { final ScriptEngine engine = manager . getEngineByName ( "python" ) ; runScript ( engine , script , bindings ) ; }
executes a python script . note that jython does not honor stdout redirection automatically . if you don ' t want the output of the python script to go to stdout you have to set this up manually . to do this you add a " zylib_console " = > pythonwriter binding . in your script you can then do the following : import sys sys . stdout = zylib_console after execution of the python script you can get the console output from the pythonwriter object .
