Here's the link to the problem: Python Interpreter in Jython
The following was a potential solution:
interp.exec("import os.path.abspath(__file__)/printTwice.py)");
interp.exec("printTwice.print_twice('Adam')");
However it returned an error:
This returned the following error: Exception in thread "main" SyntaxError: ("mismatched input '(' expecting NEWLINE", ('', 1, 22, 'import os.path.abspath(file)/printTwice.py)\n'))
import os.path.abspath(__file__)/printTwice.py)does not make sense. IfprintTwice.pyis the module that you are trying to import, then the import statement should beimport printTwice.