Hi Charlie,

I find your object factory solution very interesting. I tried it but I get the ff. error:

Exception in thread "main" Traceback (innermost last):
  File "<string>", line 1, in ?
ImportError: no module named Employee

I tested inside Jython CLI it can properly import EmployeeType.

What did I miss?

On Sat, Nov 15, 2008 at 1:40 AM, Charlie Groves <charlie.groves@gmail.com> wrote:
On Tue, Nov 11, 2008 at 8:29 PM, Vincent Gulinao
<vincent.gulinao@gmail.com> wrote:
> For example, I need to extend a class from java, implement my end of the
> code, jythonc it, which will then be called by the framework.

Do you need to jythonc it?  You can extend Java classes without
jythonc, and you can instantiate Python classes from Java without
jythonc.  I ask because jythonc is going away in 2.5, so it's not a
good long term solution.

> In particular, how do you tell Jython where to find the class you want to
> derive? (thus, the --classpath equivalent). How do you integrate the output
> of jythonc back to the framework?

Jython finds code through the classpath, so if you have jython and
your classes in your JVM, you can import your classes from Python and
make subclasses of them.  The same goes in reverse.  The framework
needs to be on the classpath at the same time, and you can use a
technique along the lines of
http://wiki.python.org/jython/JythonMonthly/Articles/October2006/3 to
get your classes into it.