embedding jpython in java

Allen Wallis allen at rrsg.ee.uct.ac.za
Wed Dec 22 07:05:35 EST 1999


hi,
I'm trying to embed some jpython in a java app, but I can't seem to find
more than one example.
I would like to use the jpython interpreter to create some objects for me,
then I would like to retrieve those objects later. The problem is that using
the PythonInterpreter.get(String) method returns a PyObject. I would ideally
like to get back to the actual instance rather than the PyObject delegate.
I've found the Py.tojava(PyObject, Class) method that works, except that it
is apparently deprecated. If someone can tell me a better way of doing this
conversion I would appreciate it, or in fact if this kind of conversion is
frowned upon, then please tell me why.
thanks
Allen





More information about the Python-list mailing list