You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
(8) |
Dec
(51) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(105) |
Feb
(93) |
Mar
(194) |
Apr
(145) |
May
(100) |
Jun
(111) |
Jul
(117) |
Aug
(126) |
Sep
(233) |
Oct
(138) |
Nov
(164) |
Dec
(109) |
2002 |
Jan
(216) |
Feb
(175) |
Mar
(216) |
Apr
(194) |
May
(157) |
Jun
(140) |
Jul
(158) |
Aug
(73) |
Sep
(105) |
Oct
(164) |
Nov
(104) |
Dec
(95) |
2003 |
Jan
(72) |
Feb
(69) |
Mar
(81) |
Apr
(151) |
May
(101) |
Jun
(139) |
Jul
(99) |
Aug
(118) |
Sep
(115) |
Oct
(151) |
Nov
(161) |
Dec
(102) |
2004 |
Jan
(120) |
Feb
(175) |
Mar
(106) |
Apr
(111) |
May
(54) |
Jun
(78) |
Jul
(76) |
Aug
(105) |
Sep
(94) |
Oct
(143) |
Nov
(75) |
Dec
(85) |
2005 |
Jan
(99) |
Feb
(77) |
Mar
(164) |
Apr
(97) |
May
(79) |
Jun
(57) |
Jul
(65) |
Aug
(102) |
Sep
(95) |
Oct
(129) |
Nov
(123) |
Dec
(52) |
2006 |
Jan
(48) |
Feb
(99) |
Mar
(90) |
Apr
(51) |
May
(81) |
Jun
(136) |
Jul
(56) |
Aug
(109) |
Sep
(50) |
Oct
(44) |
Nov
(74) |
Dec
(75) |
2007 |
Jan
(92) |
Feb
(137) |
Mar
(93) |
Apr
(79) |
May
(52) |
Jun
(74) |
Jul
(143) |
Aug
(175) |
Sep
(154) |
Oct
(137) |
Nov
(88) |
Dec
(90) |
2008 |
Jan
(58) |
Feb
(113) |
Mar
(167) |
Apr
(88) |
May
(105) |
Jun
(37) |
Jul
(87) |
Aug
(72) |
Sep
(56) |
Oct
(41) |
Nov
(102) |
Dec
(70) |
2009 |
Jan
(115) |
Feb
(113) |
Mar
(126) |
Apr
(58) |
May
(125) |
Jun
(45) |
Jul
(90) |
Aug
(125) |
Sep
(84) |
Oct
(61) |
Nov
(111) |
Dec
(61) |
2010 |
Jan
(85) |
Feb
(86) |
Mar
(130) |
Apr
(58) |
May
(57) |
Jun
(32) |
Jul
(25) |
Aug
(50) |
Sep
(41) |
Oct
(65) |
Nov
(63) |
Dec
(24) |
2011 |
Jan
(43) |
Feb
(31) |
Mar
(28) |
Apr
(68) |
May
(53) |
Jun
(42) |
Jul
(58) |
Aug
(26) |
Sep
(51) |
Oct
(76) |
Nov
(60) |
Dec
(9) |
2012 |
Jan
(16) |
Feb
(32) |
Mar
(32) |
Apr
(39) |
May
(16) |
Jun
(19) |
Jul
(3) |
Aug
(11) |
Sep
(35) |
Oct
(47) |
Nov
(28) |
Dec
(18) |
2013 |
Jan
(18) |
Feb
(36) |
Mar
(10) |
Apr
(7) |
May
(7) |
Jun
(27) |
Jul
(17) |
Aug
(35) |
Sep
(19) |
Oct
(31) |
Nov
(8) |
Dec
(22) |
2014 |
Jan
(5) |
Feb
(11) |
Mar
(18) |
Apr
(23) |
May
(26) |
Jun
(14) |
Jul
(18) |
Aug
(26) |
Sep
(20) |
Oct
(48) |
Nov
(13) |
Dec
(9) |
2015 |
Jan
(9) |
Feb
(15) |
Mar
(25) |
Apr
(10) |
May
(26) |
Jun
(6) |
Jul
(13) |
Aug
(5) |
Sep
(14) |
Oct
(36) |
Nov
(24) |
Dec
(18) |
2016 |
Jan
(24) |
Feb
(11) |
Mar
(1) |
Apr
(6) |
May
(7) |
Jun
(3) |
Jul
(9) |
Aug
(15) |
Sep
(22) |
Oct
(5) |
Nov
(5) |
Dec
(2) |
2017 |
Jan
(20) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(5) |
Jun
(7) |
Jul
(14) |
Aug
(9) |
Sep
(18) |
Oct
(2) |
Nov
(3) |
Dec
(3) |
2018 |
Jan
(7) |
Feb
(6) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(18) |
Sep
(8) |
Oct
(9) |
Nov
(4) |
Dec
(6) |
2019 |
Jan
(5) |
Feb
|
Mar
(2) |
Apr
(4) |
May
(6) |
Jun
(8) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
|
Nov
(1) |
Dec
|
2020 |
Jan
(8) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
(5) |
Nov
(2) |
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2022 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
(5) |
Jul
(15) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Thomas B. B. <tb...@sy...> - 2001-08-21 10:23:11
|
From: Robert W. B. <rb...@di...> - 2001-08-20 21:55:07
|
---------- Forwarded message ---------- Hello Youn-Jin, *moved to jyt...@li... On Mon, 20 Aug 2001, Young-Jin Lee wrote: > Hi, all. > I have a question on the embedded Jython. It seems like that Jython > enables a Java application to use a Python interpreter. Then I'm curious > if the following is possible with Jython and Java. I have a Java > application and I want to use one of the Python extension, VPython. Can > my Java application call VPython's method if it uses Jython or not? > > Is there any other way for a Java application to use Python extension? > Thanks in advance. I'm looking forward to hearing your advice. > > Young-Jin Lee The safest way to say this is that Java can use any module/extension that Jython can use. Jython cannot use C extensions. If your VPython extension is in C, then VPython will not run in Jython (without extra work). If your VPython extension has no C dependencies, test it in Jython to ensure there are no unexpected problems. If it tests OK, you're ready to use it from Java. Other choices: Other projects have sought Java-CPython integration, but all such projects have been quite for some time. There appears to be no activity on such a tool other than Jython (although I've had trouble staying up with the other Python lists lately, so could be mistaken). Cheers, Robert |
From: Robert W. B. <rb...@di...> - 2001-08-20 16:14:04
|
Hello Pulak, On Mon, 20 Aug 2001, Pulak Piplani (UAB) wrote: > Hi, > > I am tring to use Jython for a scripting application to configure a External Device. > > The idea is to provide user the flexibility of writing scripts in jython while the GUI and other aspects of external communications etc are handled in Java. > > Once the GUI is ready and the communication class is instantiated the control will be passes to a jython script. > > The communication Object ( which is a java object) will be passes on to the Jython script which will then call "Send(Command)" interface for example. > > > To do I am doing the following > > Java side > -------------- > //jptComm object is already instantiated and setup. It has an interface send(string). > > PythonInterpreter interp = new PythonInterpreter(); > try{ > interp.execfile(fileName); // where filename is the name of jython script ( runscript.py) > } > catch( PyException except) > { > System.out.println("Error occured in exec file"); > } > try{ > interp.exec("run(jptComm)"); // where the jptComm in the communication object. How did the interpreter get the identifier "jptComm"? Maybe a "set" is missing- see end. > //interp.exec("run(2)"); //instead if I pass builtin types like int or string it works fine. > } > catch( PyException except) > { > System.out.println("Error occured in EXEC"); > System.out.println(except.toString()); > } > } > __________________________________________________________________________________ > > > Jython side > --------------- > > > import java > import jpitool.jpitoolCommunicator > > def run(jcp): > print 'xyz' > #jcp.send('ls') > > > if __name__ == '__main__': > run(2) Still no jptComm identifier set. This is starting to look suspicious. <snip> > Error occured in EXEC > Traceback (innermost last): > File "<string>", line 1, in ? > NameError: jptComm I'm usure what object jptComm is, but here's my guesses: 1. jptComm is an object that should be created in the Jython script- maybe an instance of jpitoolCommunicator. If this is the case, change the Jython code to the following: =================================== import java import jpitool.jpitoolCommunicator jptComm = jpitool.jpitoolCommunicator(someargs) # <--create jptComm def run(jcp): print 'xyz' if __name__ == '__main__': run(2) =================================== 2. jptComm is a Java object that did not get set in the interpreter. If this is the case, add a "set" method previous to the call to interp.exec("run(jptComm)") like the following: interp.set("jptComm", myjptCommObject); interp.exec("run(jptComm)"); either way, jptComm is defined before you use it in the run function, which is the fix. Cheers, Robert |
From: HEINECKE J. FTRD/DMI/L. <joh...@rd...> - 2001-08-20 15:16:16
|
> | I have recently installed jython 2.0 on a new Linux box > | (based on Red Hat 7.1, java 1.3.1). When I want to use > | jythonc, even for the most simple programmes, java > | stops with an segementation fault, before reading the > | first lins of my .py-file. > | If I compile the stuff on my Sun (also equipped with java 1.3.1) > | I can use the class files on the Linux box. > | On the other hand, jython works fine as does compiling > | and using any kind of java. > | > | Do you have any idea? Is this possibly linked to red hat 7.1 > | (red hat 7.0 on another linux machine does not pose any > problems either... > > Just out of curiosity, what compiler was used to build the JVM (by Sun > or Blackdown or whoever built it)? If it wasn't gcc 2.96 then you > will almost surely have problems. RedHat very nicely broke binary > compatibility with everything else by using a development version of a > compiler. ehm, I do not know. It was the linux version (rpm and tar.gz) from java.sun.com which worked on red hat 7.0 and does not work on 7.1 in fact, all other java works fine (compiling and executing class files compiled locally and elsewhere. That's why I thought it's in the classes used by jythonc... Johannes |
From: dman <ds...@ri...> - 2001-08-20 13:52:16
|
On Mon, Aug 20, 2001 at 11:19:09AM +0200, HEINECKE Johannes FTRD/DMI/LAN wrote: | Hello, | | I have recently installed jython 2.0 on a new Linux box | (based on Red Hat 7.1, java 1.3.1). When I want to use | jythonc, even for the most simple programmes, java | stops with an segementation fault, before reading the | first lins of my .py-file. | If I compile the stuff on my Sun (also equipped with java 1.3.1) | I can use the class files on the Linux box. | On the other hand, jython works fine as does compiling | and using any kind of java. | | Do you have any idea? Is this possibly linked to red hat 7.1 | (red hat 7.0 on another linux machine does not pose any problems either... Just out of curiosity, what compiler was used to build the JVM (by Sun or Blackdown or whoever built it)? If it wasn't gcc 2.96 then you will almost surely have problems. RedHat very nicely broke binary compatibility with everything else by using a development version of a compiler. -D |
From: Pulak P. (UAB) <Pul...@ua...> - 2001-08-20 12:46:21
|
Hi, I am tring to use Jython for a scripting application to configure a = External Device. The idea is to provide user the flexibility of writing scripts in = jython while the GUI and other aspects of external communications etc = are handled in Java. Once the GUI is ready and the communication class is instantiated the = control will be passes to a jython script.=20 The communication Object ( which is a java object) will be passes on = to the Jython script which will then call "Send(Command)" interface for = example.=20 To do I am doing the following Java side -------------- //jptComm object is already instantiated and setup. It has an interface = send(string). PythonInterpreter interp =3D new PythonInterpreter(); try{ interp.execfile(fileName); // where filename is the name of = jython script ( runscript.py) } catch( PyException except) { System.out.println("Error occured in exec file"); } try{ interp.exec("run(jptComm)"); // where the jptComm in the = communication object. //interp.exec("run(2)"); //instead if I pass builtin types = like int or string it works fine. } catch( PyException except) { System.out.println("Error occured in EXEC"); System.out.println(except.toString()); } } ________________________________________________________________________= __________ Jython side --------------- import java import jpitool.jpitoolCommunicator def run(jcp): print 'xyz' #jcp.send('ls') if __name__ =3D=3D '__main__': run(2) ________________________________________________________________________= _________ If I execute the Java code and call the run function from there with = communicator object as the argument it always gives me a "NameError" exception =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Error occured in EXEC Traceback (innermost last): File "<string>", line 1, in ? NameError: jptComm =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D If i use any standard data type like int or string for eg " = interp.exec("run(2)") " it works fine. Can someone help. Any information on the same will be helpful. Regards, Pulak Piplani =C4S/UAB/S/MU Ericsson Utvecklings AB. Phone : +46 8 727 2559 ECN : 851 2559 |
From: HEINECKE J. FTRD/DMI/L. <joh...@rd...> - 2001-08-20 09:38:19
|
Hello, I have recently installed jython 2.0 on a new Linux box (based on Red Hat 7.1, java 1.3.1). When I want to use jythonc, even for the most simple programmes, java stops with an segementation fault, before reading the first lins of my .py-file. If I compile the stuff on my Sun (also equipped with java 1.3.1) I can use the class files on the Linux box. On the other hand, jython works fine as does compiling and using any kind of java. Do you have any idea? Is this possibly linked to red hat 7.1 (red hat 7.0 on another linux machine does not pose any problems = either... puzzled Johannes --=20 Johannes Heinecke France T=E9l=E9com R&D, DMI/GRI/Langues Naturelles 2 avenue Pierre Marzin, F-22307 Lannion cedex Tel.: +33 (0) 2 96 05 21 77 Email: joh...@rd... |
From: <bc...@wo...> - 2001-08-18 15:35:43
|
[chuck clark] >I checked out the FAQ and the Jython vs. CPython docs and wasn't able to >find an answer to the following. I have this code: >def test(): > print noname > >try: > print "line 5" > print "line 6" > test() > print "line 8" > print "line 9" >except ValueError: > print "shouldn't happen." > >When I run it under python I get the following stack trace: >line 5 >line 6 >Traceback (innermost last): > File "test.py", line 7, in ? > test() > File "test.py", line 2, in test > print noname >NameError: noname > >Under Jython I get: >line 5 >line 6 >Traceback (innermost last): > File "test.py", line 10, in ? > File "test.py", line 2, in test >NameError: noname > >I lose some granularity in Jython. If I were to call the extracted method >(test in this case) several times within the try block I can't tell on >which line the failing call resulted from. It always reports from the >except line. Why is this? Is it the expected behavior? It is a bug. I have added a bug report about it and expect a fix to be included in beta1. Thanks for reporting it. regards, finn |
From: Ryan W. <RW...@IN...> - 2001-08-17 15:34:46
|
Thanks, I was thinking it would be the java gui's, but I was unsure of tkinter and others. Probably much easier than than the rpc server method. I'll just sit back and learn now. Later, Ryan |
From: dman <ds...@ri...> - 2001-08-17 15:13:07
|
On Fri, Aug 17, 2001 at 09:59:47AM -0500, Ryan Ware wrote: | Hello, | | I am interested in learning more about Jython. What is commonly used to | develop gui interfaces. Do you use swing, tkinter, or something else? The only GUI toolkits that work with Jython are those that work with Java. Mainly this includes AWT and Swing, though I have heard that someone created Java bindings for Tk and GTK+. An alternative is to have a CPython process as an RPC server that runs the GUI and a Jython process that does other processing and sends data to the CPython process for displaying in the GUI (via RPC). HTH, -D |
From: Ryan W. <RW...@IN...> - 2001-08-17 15:08:15
|
Hello, I am interested in learning more about Jython. What is commonly used to develop gui interfaces. Do you use swing, tkinter, or something else? Thanks Ryan Ware |
From: Peter B. <bri...@ma...> - 2001-08-16 21:20:12
|
Finn: I've managed to reproduce the jpy$packages problem with a small example. We need the following two files, foo.py and bug.py. -------------------------- foo.py ----------------------------- import java class foo(java.lang.Object): pass --------------------------------------------------------------- -------------------------- bug.py ----------------------------- from foo import foo class bar(foo): pass --------------------------------------------------------------- When compiling this with jythonc --deep bug.py I get the following messages: --------------------------------------------------------------- processing bug processing foo Required packages: java.lang Creating adapters: Creating .java files: foo module foo extends java.lang.Object bug module bar extends foo Compiling .java to .class... Compiling with args: ['/usr/local/j2sdk1.3.1/bin/javac', '-classpath', '/usr/local/jython-2.0/jython.jar::./jpywork::/usr/local/jython-2.0/Tools/jythonc:/home/brinkman/prog/java/gumbie/work/.:/usr/local/jython-2.0/Lib:/home/brinkman/prog/java/gumbie:/home/brinkman/prog/java', './jpywork/foo.java', './jpywork/bug.java']1 ./jpywork/bug.java:60: jpy$packages is inherited from foo and hides variable in outer class bug. An explicit 'this' qualifier must be used to select the desired instance. Py.initProxy(this, "bug", "bar", new Object[] {}, jpy$packages, jpy$properties, "", new String[] {"bug", "foo"}); ^ ./jpywork/bug.java:60: jpy$properties is inherited from foo and hides variable in outer class bug. An explicit 'this' qualifier must be used to select the desired instance. Py.initProxy(this, "bug", "bar", new Object[] {}, jpy$packages, jpy$properties, "", new String[] {"bug", "foo"}); ^ 2 errors ERROR DURING JAVA COMPILATION... EXITING --------------------------------------------------------------- Experiments suggest that the following circumstances are necessary to trigger the bug. 1. The class foo is derived from a java class. 2. The name of the module (foo) is the same as the name of the class. 3. The whole thing gets compiled with the --deep option. Note that these three conditions are not sufficient to trigger the bug; I've got examples satisfying both 1. and 2. that compile just fine. Best, Peter On Thu, Aug 16, 2001 at 07:46:07PM +0000, Finn Bock wrote: > [Peter Brinkmann] > > >Hi! > >I'm afraid I've run into another problem related to jythonc. When compiling > >a rather large project, jythonc quit after javac reported the following > >error: > > > >1 ./jpywork/small.java:183: Variable 'jpy$packages' is inherited in nested class small. newgui, > > and hides a variable of the same name in class small. An explicit 'this' qualifier must ... > > > >Has anyone noticed this kind of problem before? > > It is new to me. > > >I can try to reproduce the > >problem with a small amount of code, but before I do that, I'd like to make > >sure that this one is new. > > An example would make it a lot easier for us. You already know where to > post it: > > http://sourceforge.net/tracker/?group_id=12867&atid=112867 > > regards, > finn > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: <bc...@wo...> - 2001-08-16 19:44:05
|
[Peter Brinkmann] >Hi! >I'm afraid I've run into another problem related to jythonc. When compiling >a rather large project, jythonc quit after javac reported the following >error: > >1 ./jpywork/small.java:183: Variable 'jpy$packages' is inherited in nested class small. newgui, > and hides a variable of the same name in class small. An explicit 'this' qualifier must ... > >Has anyone noticed this kind of problem before? It is new to me. >I can try to reproduce the >problem with a small amount of code, but before I do that, I'd like to make >sure that this one is new. An example would make it a lot easier for us. You already know where to post it: http://sourceforge.net/tracker/?group_id=12867&atid=112867 regards, finn |
From: <bc...@wo...> - 2001-08-15 19:47:46
|
[Tom Whittaker] >This is an FYI... > >The problem I asked about last week, where I had a class named "visad.Data" and >one named "visad.data.mcidas.PointDataAdapter", and I was unable to import the >latter. Could you make a bugreport about this. That way it will not be forgotten again. regards, finn |
From: Tom W. <to...@ss...> - 2001-08-15 19:16:39
|
Sorry...in my last posting, I should have typed: from visad.data.mcidas import PointDataAdapter instead of: > from visad.data.mcidas.PointDataAdapter > -- Tom Whittaker (to...@ss...) University of Wisconsin-Madison Space Science and Engineering Center Phone/VoiceMail: 608/262-2759 Fax: 608/262-5974 |
From: Tom W. <to...@ss...> - 2001-08-15 18:48:35
|
This is an FYI... The problem I asked about last week, where I had a class named "visad.Data" and one named "visad.data.mcidas.PointDataAdapter", and I was unable to import the latter. I tried 2.1's caseok switch and that didn't matter; however, when I do this sequence: from visad import * from visad.data.mcidas.PointDataAdapter I get the desired result - there is no exception thrown for the "wrong name (visad/Data)" when I import PointDataAdapter. tom -- Tom Whittaker (to...@ss...) University of Wisconsin-Madison Space Science and Engineering Center Phone/VoiceMail: 608/262-2759 Fax: 608/262-5974 |
From: Peter B. <bri...@ma...> - 2001-08-14 08:33:51
|
Hi! I'm afraid I've run into another problem related to jythonc. When compiling a rather large project, jythonc quit after javac reported the following error: -------------------------------------------------------------------------- Compiling .java to .class... ... 1 ./jpywork/small.java:183: Variable 'jpy$packages' is inherited in nested class small. newgui, and hides a variable of the same name in class small. An explicit 'this' qualifier must be used to select the desired instance. Py.initProxy(this, "small", "newgui", new Object[] {}, jpy$packages, jpy$properties, "", new String[] {"PowerFrame", "string", "small", "MenuMaker", "Default", "GUIFactory", "Config", "ImageCanvas"}); ^ ... Note: 2 files use or override a deprecated API. Recompile with "-deprecation" for details. 4 errors, 1 warning ERROR DURING JAVA COMPILATION... EXITING -------------------------------------------------------------------------- Has anyone noticed this kind of problem before? I can try to reproduce the problem with a small amount of code, but before I do that, I'd like to make sure that this one is new. Best, Peter |
From: Peter B. <bri...@ma...> - 2001-08-12 23:28:24
|
Samuele: > Right, this was long standing bug, but has already been fixed in 2.1 codebase. Hmm, is it possible that this bug fix has created a new bug in 2.1 that I ran into a few days ago? I reported it and it's now listed as bug #449956. Best, Peter On Mon, Aug 13, 2001 at 12:39:53AM +0200, Samuele Pedroni wrote: > [Peter Brinkmann] > > ---------------------------------------------------- > > import java > > > > class spam(java.lang.Object): > > def hashCode(self): > > print 'spam' > > return java.lang.Object.hashCode(self) > > > > class eggs(spam): > > def hashCode(self): > > print 'eggs' > > return spam.hashCode(self) > > > > s=spam() > > e=eggs() > > > > print s.hashCode() # this one works > > print e.hashCode() # here we get stuck > > ---------------------------------------------------- > > > > This shouldn't be happening, right? > Right, this was long standing bug, but has already been fixed in 2.1 codebase. > > regards, Samuele Pedroni. > |
From: Samuele P. <pe...@in...> - 2001-08-12 22:42:04
|
[Peter Brinkmann] > ---------------------------------------------------- > import java > > class spam(java.lang.Object): > def hashCode(self): > print 'spam' > return java.lang.Object.hashCode(self) > > class eggs(spam): > def hashCode(self): > print 'eggs' > return spam.hashCode(self) > > s=spam() > e=eggs() > > print s.hashCode() # this one works > print e.hashCode() # here we get stuck > ---------------------------------------------------- > > This shouldn't be happening, right? Right, this was long standing bug, but has already been fixed in 2.1 codebase. regards, Samuele Pedroni. |
From: Peter B. <bri...@ma...> - 2001-08-12 05:19:29
|
Hi! I've noticed a problem related to jython classes derived from java classes. The problem occurs under the following circumstances: 1. A package derives a class A from a java class and overrides a method M of the java class but calls the original method at some point. 2. The same package derives a class B from class A, overrides the same method M but calls the corresponding method of A at some point. Then, when B.M is called, jython seems to go into an infinite loop. Here's a little program that reproduces the problem: ---------------------------------------------------- import java class spam(java.lang.Object): def hashCode(self): print 'spam' return java.lang.Object.hashCode(self) class eggs(spam): def hashCode(self): print 'eggs' return spam.hashCode(self) s=spam() e=eggs() print s.hashCode() # this one works print e.hashCode() # here we get stuck ---------------------------------------------------- This shouldn't be happening, right? Best, Peter |
From: Peter B. <bri...@ma...> - 2001-08-10 23:27:09
|
Finn: On Fri, Aug 10, 2001 at 06:09:09AM +0000, Finn Bock wrote: > [...] > Please try to make an example. And add a bug report about it. Okay, I've been able to reproduce the problem in jythonc 2.1a3 with a short bit of code. I just added a bug report (#449956). The bug occurs under the following circumstances: 1. A package derives a subclass A from a java class. 2. The same package derives a subclass B from A. 3. The package gets compiled with the --package option. When creating java code, jythonc 2.1a3 doubles the package name in front of B, i.e., if the name of the package is foo, then it creates the name foo.foo.B, which causes javac to terminate with an error. Here's a program that reproduces the bug: ----------------------------------- import java class spam(java.lang.Object): pass class eggs(spam): pass ----------------------------------- Here's what happens when the above program is being compiled with the --package option: /usr/local/jython-2.1a3/jythonc --package foo jcbug.py processing jcbug Required packages: java.lang Creating adapters: Creating .java files: jcbug module spam extends java.lang.Object eggs extends foo.foo.jcbug.spam Compiling .java to .class... Compiling with args: ['/usr/local/jdk1.2.2/bin/javac', '-classpath', '/usr/local/jython-2.1a3/jython.jar::./jpywork::/usr/local/jython-2.1a3/Tools/jythonc:/home/brinkman/prog/java/test/.:/usr/local/jython-2.1a3/Lib:/home/brinkman/prog/java/gumbie:/home/brinkman/prog/java', './jpywork/foo/jcbug.java'] 1 ./jpywork/foo/jcbug.java:103: Superclass foo.foo.jcbug.spam of nested class foo.jcbug. eggs not found. public static class eggs extends foo.foo.jcbug.spam implements org.python.core.PyProxy, org.python.core.ClassDictInit { ^ 1 error ERROR DURING JAVA COMPILATION... EXITING This problem does not occur with jythonc 2.0, so it seems to be new. Best, Peter |
From: O'Brien-Strain, E. <eo...@ex...> - 2001-08-10 18:45:40
|
> -----Original Message----- > From: Liu, Jesse (C-BASS) [mailto:Jes...@c-...] > [...]no file locking here(is there any one in Java, > BTW?)[...] You can do cooperative file locking with the createNewFile method of java.io.File From the Java API doc at http://java.sun.com/j2se/1.3/docs/api/java/io/File.html for method createNewFile: "Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file. This method, in combination with the deleteOnExit() method, can therefore serve as the basis for a simple but reliable cooperative file-locking protocol." __ Eamonn O'Brien-Strain HP Labs eo...@hp... |
From: Liu, J. (C-BASS) <Jes...@c-...> - 2001-08-10 18:13:40
|
Thanks for the reply. Late is always better than never.:) I looked up in the source code a little bit and found the following in CachedJarsPackageManager.java: /** Open cache index for writing back to persistent storage - hook. * This default impl is part of the off-the-shelf local * file-system cache impl. * Can be overriden. */ protected DataOutputStream outOpenIndex() throws IOException { File indexFile = new File(cachedir, "packages.idx"); return new DataOutputStream( new BufferedOutputStream(new FileOutputStream(indexFile))); } Since there is no file locking here(is there any one in Java, BTW?), if 2 processes are writing to the same "packages.idx", you may get garbage. If this garbage isn't in the format the PackageManager can recognize, the cache will simply be ignored and the jars are processed again. However, what if the garbage happens to make sense but points to different location of the jar? I guess the behavior is simply unpredictable. Also the chance of this happening shall be really small that we can pretend it never happen(what's the chance all oxygen molecules move to the other side of the room at the same time s.t. you will be suffocated anyway?) So separate cache dir seems reliable for a critical task, but if I need a cache for each user, each host and each process, why do I need it at all? I wish I have the freedom to specify when to update a cache, then I will just need to create the cache once for the first time and never update it unless it is instructed. -----Original Message----- From: Samuele Pedroni [mailto:pe...@in...] Sent: Friday, August 10, 2001 10:15 AM To: jyt...@li...; Liu, Jesse (C-BASS) Subject: Re: [Jython-users] Q: Package Manager in jpython/jython Sorry for answering only now > > I am running multiple processes using jython2.0 in NFS. These processes may > have different python paths but use the same cache dir and access the same > files there. Is there any danger these processes will clobber each other and > produce unpredictable results, i.e. using a wrong package? What exactly > would a Package Manager do in this case? Thanks. > > Jesse Liu > I would say, that it is better to use separate cache dir if your process access new jars sometime, there is no concurrency control for cache accesses, OTOH if the set of accessed jar is someone fixed then the cache (once setup) is used just in read-only mode and there should be no problem. regards, Samuele Pedroni. |
From: Kevin B. <kb...@ca...> - 2001-08-10 15:34:26
|
Paolo Tortora wrote: > > Hi. > > In our project we have to invoke jython scripts from a C++ process. > This jython scripts are for unti test and then the C++ process has to verify the > result of the jython scripts. > So, the problem seems to be how making communication between C++ process and jvm > process (jython). > The only way to be done seems to test the result of the jvm process as unix > process; in other words, the script jython should terminate with the exit system > call equals to zero or one (exit(1) or exit (0) ) and the C++ process tests it. > Anyone knows any other possible solutions ? > Is it possible to invoke in some way a jython script from a python script and > testing back the result ? > I think there is no other solution than the first one depicted above, otherwise > .. any helps is appreciate. It really depends on what you need, and how tight your integration needs to be. Do you really need it to be jython? Or could you use CPython? Then the C++ integration is pretty easy. If the tests need to exercise Java code, maybe JPE (http://sourceforge.net/projects/jpe) would let you write the tests in CPython & invoke the Java code that way. Do you really need to write the verification process in C++? Use Jython for that instead... You can also have the C++ code use CORBA or a socket, and have the jython process connect back to the C++ server. And worst case (?), you can always write C++ code to the Java Native Interface (JNI)... kb |
From: Jeff E. <je...@ad...> - 2001-08-10 14:43:10
|
Paolo Tortora wrote: > > Hi. > > In our project we have to invoke jython scripts from a C++ process. > This jython scripts are for unti test and then the C++ process has to verify the > result of the jython scripts. > So, the problem seems to be how making communication between C++ process and jvm > process (jython). Use the JNI invocation API to start a JVM within your C++ process. See http://java.sun.com/docs/books/tutorial/native1.1/invoking/index.html Then you can direct the JVM to run the Jython interpreter. -- Jeff Emanuel Landmark Graphics Corporation je...@ad... |