PythonInterpreter

initialize

Initializes the Jython runtime. This should only be called
once, before any other Python objects (including
PythonInterpreter) are created.

Parameters:

preProperties - A set of properties. Typically
System.getProperties() is used. preProperties
override properties from the registry file.

postProperties - Another set of properties. Values like python.home,
python.path and all other values from the registry
files can be added to this property
set. postProperties override system properties and
registry properties.

execfile

execfile

compile

Compiles a string of Python source as either an expression (if
possible) or a module.
Designed for use by a JSR 223 implementation: "the Scripting
API does not distinguish between scripts which return values
and those which do not, nor do they make the corresponding
distinction between evaluating or executing objects."
(SCR.4.2.1)

get

Returns the value of a variable in the local namespace.
The value will be returned as an instance of the given Java class.
interp.get("foo", Object.class) will return the most
appropriate generic Java object.

Parameters:

name - the name of the variable

javaclass - the class of object to return

Returns:

the value of the variable as the given class, or null
if that name isn't assigned