On Fri, 15 Dec 2000, Frank Chen wrote:
> In JPython, I met this problem too. I cannot compile a Java program
> contained a class made out of JPython.
> If we just import "org.python.util.PythonInterpreter" in JSP's Java code, I
> cannot imagine
> where it can go far?
> If I want to save a file, make a search through the PythonInterpreter
> object, it looks like very difficult?!
> > I have not been able to use jythonc compiled files with JSP. There
> > were too many troubles loading the inner class. If I write a
> > jython class foo with method whatever, either "foo$_PyInner.class not
> > found in import" or "Method Whatever not found in class foo." This is
> > confusing when the log shows the classpath used for the jsp- which
> > correct. I haven't had time to look into why this happens, mainly
> > "import org.python.util.PythonInterpreter;" is so effective.
> > However, it would be nice to just say jythonc foo.py and be done with it.
> > Have others been through this?
I didn't mean to import the PythonInterpreter in the JSP code. I
actually was thinking about instances (no pun intended) where
writing a java class that imports PythonInterpreter acts as the
proxy for python files. In this case, import the java class in
the JSP, initialize PythonInterpreter in the java class, then use
the java class's interfaces to get at your python files.
I hope this helps clarify.