From: Frank W. <fwi...@gm...> - 2006-06-08 20:51:25
|
> First, some setup for the random stub. In Setup.java, You'll need to > change: > _random:org.python.module.random.RandomModule > > to (note the 's' in modules): > > _random:org.python.modules.random.RandomModule oops :) > > > I'm seeing problems in how subclassing a Java class in Python is > working. The randon.Random class is a subclass of _random.Random, which > is mapped to the PyRandom class. But when I instantiate random.Random, > I get a class back of type PyRandom, instead of Random. It doesn't have an "exposed_name" yet. > > To test it futher, and to verify, I added a method to PyRandom: > > public String seed() {return "java function";} There is a whole bunch of new-style stuff that you need to do to get this to work, I started a tutorial at the bottom of http://www.jython.org/Project/devguide.html, though it is not finished yet. To get subclasses to work it also needs a (generated) PyRandomDerived -Frank |