472,347 Members | 2,321 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,347 software developers and data experts.

Jython + propertyChangeListener?!?!


Hi. I'm new to jython/python and am trying to interface a jython
script with some java code that produces property change events.
Here's the jython code:

import sys;
from javax import swing;
from java.beans import PropertyChangeListener;
from gov.nasa.gsfc.irc.instrument import InstrumentModelProvider;

class irchooks(PropertyChangeListener):

def propertyChange(self, e):
print "Property Change:";
print e;
print self;

def __init__(self):

self.modelProvider = InstrumentModelProvider.getInstance()
self.model = self.modelProvider.getInstrument("Detector")

print "Sample Rate: "
print self.model.getFramePeriod();


print "Generate a property change event"

Then when I try running this code from the application ( via the bean
scripting framework ), I keep getting these errors:

Sample Rate:
Traceback (innermost last):
File "<string>", line 37, in ?
File "<string>", line 33, in __init__
TypeError: propertyChange() too many arguments; expected 1 got 2
Exception in backgrounded command procedure: PropertChangeTest
exception from JPython: Traceback (innermost last):
File "<string>", line 37, in ?
File "<string>", line 33, in __init__
TypeError: propertyChange() too many arguments; expected 1 got 2
: Traceback (innermost last):
File "<string>", line 37, in ?
File "<string>", line 33, in __init__
TypeError: propertyChange() too many arguments; expected 1 got 2

Huh? Any ideas?


Matt Newcomb
Yerkes Observatory
373 W. Geneva St.
Williams Bay, WI
Jul 18 '05 #1
0 1394

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Michael Chermside | last post by:
Ype writes: > For the namespaces in Jython this 'Python internal thread safety' > is handled by the Java class: > >...
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will...
by: angel | last post by:
A java runtime environment includes jvm and java class (for example classes.zip in sun jre). Of course jython need jvm,but does it need java class....
by: Jan Gregor | last post by:
Hello I found that jython catches exact java exceptions, not their subclasses. Is there some way to get around this limitation (or error) ? My...
by: scott | last post by:
I installed darwinports and did a "sudo port install jython" ------------------------- scott$ which jython /opt/local/bin/jython ...
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this...
by: Sloan.Kohler | last post by:
Is Jython development dead or has it just seemed that way for over a year?. The jython.org website has a recent new appearance (but no new content)...
by: Neil Wallace | last post by:
Hi all, I am a novice Python/Jython programmer, and Ubuntu user. Ubuntu still only supports only version 2.1 of Jython. I have used the GUI...
by: sarup26 | last post by:
Hello .. I would like to know more about Python and Jython? What is the difference between both of them? What is the future for Jython and which...
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.