public static PythonInterpreter getPythonInterpreter()
{
if (interpreter == null)
{
interpreter = new PythonInterpreter();
PySystemState sys = Py.getSystemState();
sys.add_package("javax.management");
sys.add_package("javax.management.loading");
sys.add_package("javax.management.modelmbean");
sys.add_package("javax.management.monitor");
sys.add_package("javax.management.openmbean");
sys.add_package("javax.management.remote");
sys.add_package("javax.management.remote.rmi");
sys.add_package("javax.management.relation");
sys.add_package("javax.management.timer");
try
{
String script = loadStream(JythonRunner.class.getClassLoader().getResourceAsStream("mx4j/tools/jython/jmxUtils.py"));
interpreter.exec(script);
}