From: Rubin, D. <DR...@fn...> - 2003-09-01 13:15:49
|
Hello, I am trying to write a simple script to call a method on the java imported superclass: class Inheritor: def __init__(self, name): self.name = name def show(self): print 'Inheritor -- name: %s' % self.name obj1 = Inheritor('Apricot') obj1.show() import ImportTester obj2 = ImportTester obj2.pr() public class ImportTester { public void pr(){ System.out.println("Inside printer"); } } when I run the script I get: C:\jython\Lib>jython Inheritor.py Inheritor -- name: Apricot Traceback (innermost last): File "Inheritor.py", line 15, in ? TypeError: pr(): expected 1 args; got 0 Can you help? Regards Dani ___________________________________________________________________________________________________ The views expressed in this email are, unless otherwise stated, those of the author and not those of the FirstRand Banking Group or its management. The information in this e-mail is confidential and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful. Whilst all reasonable steps are taken to ensure the accuracy and integrity of information and data transmitted electronically and to preserve the confidentiality thereof, no liability or responsibility whatsoever is accepted if information or data is, for whatever reason, corrupted or does not reach its intended destination. ________________________________ |