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
metlos / PythonScriptEngineInitializer.java
Created Jul 12, 2012
PythonScriptEngineInitializer
View PythonScriptEngineInitializer.java
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);
View scriptEngineProvider.java
public class PythonScriptEngineProvider implements ScriptEngineProvider {
@Override
public String getSupportedLanguage() {
return "python";
}
@Override
public ScriptEngineInitializer getInitializer() {
return new PythonScriptEngineInitializer();
You can’t perform that action at this time.