Skip to content

Instantly share code, notes, and snippets.

Lukas Krejci metlos

Block or report user

Report or block metlos

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
metlos /
Created Jul 12, 2012
public class PythonScriptEngineInitializer implements ScriptEngineInitializer {
private static final Log LOG = LogFactory.getLog(PythonScriptEngineInitializer.class);
static {
Properties props = new Properties();
props.put("python.packages.paths", "java.class.path,sun.boot.class.path");
props.put("python.packages.directories", "java.ext.dirs");
props.put("python.cachedir.skip", false);
PythonInterpreter.initialize(System.getProperties(), props, null);
public class PythonScriptEngineProvider implements ScriptEngineProvider {
public String getSupportedLanguage() {
return "python";
public ScriptEngineInitializer getInitializer() {
return new PythonScriptEngineInitializer();
You can’t perform that action at this time.