From: <bc...@wo...> - 2001-01-10 18:19:45
|
[Finn] > The class *must* inherit from a java class. F.ex > > from ftplib import FTP > import java > > class FTPClient(java.lang.Object): [Brad] >Thanks for the suggestion, but it still doesn't work. > >Somehow I thought that inheritance from Object was implied for all >classes in Jython.. Since all objects are a subclass of Object in Java Using a java base class (like Object) tells the jython compiler to generate a proxy class. It is this proxy class which should contain your Put() method. Without a java base class, the python class is only compiled into series of PyCode objects. These code objects are callable and usefull from jython, but does not have any representation in java. >In any case, changing it to: > >class FTPClient(java.lang.Object): > >Still doesn't produce a public Put method. I assume you also added a "import java" somewhere above. Take a look at the output from jythonc. If the proxy generation is succesfull, the output must include: Creating .java files: FTPClient extends java.lang.Object regards, finn |