Do you happen to run the Python file from within python console or jython console? If it is jython console you may want to download the jython-standalone.jar and try again.
George Baah <firstname.lastname@example.org> wrote:
Hi Everyone,I am trying to call a python file from within java however I've run into this problem.//java codePythonInterpreter p = new PythonInterpreter();p.execfile("myfile.py");//myfile.pyimport sysimport osFor some reason when I call myfile.py, i get an import error on subprocess."ImportError: No module named subprocess"This makes no sense as jython.jar is in my classpath and also when I execute myfile.pyfrom the command line everything works fine. Any help will be greatly appreciated.Thanks.George