interpreter.exec("import sys");
String path = Matcher.quoteReplacement(script.getParent());
interpreter.exec("sys.path.append('" + path + "')");
// Execute the script and create an instance of the desired class.
interpreter.execfile(script.getAbsolutePath());
interpreter.exec("obj = " + className + "()");
T obj = interpreter.get("obj", interfaceClass);
// Remove the directory where the Python script resides from the Python
// module search path.