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: Samuele P. <pe...@in...> - 2001-03-06 15:48:56
|
Hi. (This may be of general interest) [me on jython-dev answering to Janusch.Waclawczyk ] > Maybe we should provide better support for this (?). > > [ Janusch Waclawczyk] > > I wanted to create a new entry to a FAQ, but I failed: > > > > 3.8. How can I create 2-dimen. Java arrays from jython? > > The following works (not that intuitive): > >>> from java.lang import String,Object > >>> from jarray import array > >>> a=array(["a","b"],String) > >>> a > array(['a', 'b'], java.lang.String) > >>> # this is wrong: > >>> b=array([a,a],type(a)) # or a.__class__ > >>> b > array([array(['a', 'b'], java.lang.String), array(['a', 'b'], > java.lang.String)], org.python.core.PyArray) > >>> # this works ! > >>> b=array([a,a],Object.getClass(a)) > >>> b > array([array(['a', 'b'], java.lang.String), array(['a', 'b'], > java.lang.String)], [Ljava.lang.String;) > >>> > # [Ljava.lang.String; is the java internal name for (class) type > # java.lang.String[] > # b is a (jython side) java.lang.String[][] > I forgot to point out, that typically one does not need to work with java arrays on jython side, lists do the job: given: public class Wrap {} ----- public class Dummmy { public static void dummy(Wrap[][] a) {} } all this works: >>> import Dummy >>> Dummy.dummy([]) >>> Dummy.dummy([[]]) >>> a,b,c,d = [ Wrap() for i in range(0,4) ] >>> Dummy.dummy([[a,b]]) >>> Dummy.dummy([[a,b],[c,d]]) regards, Samuele Pedroni |
From: Darrell G. <da...@do...> - 2001-03-06 01:52:20
|
What your looking for isn't far from what Gordon provides here--> http://www.mcmillan-inc.com/builder.html Check out ihooks.py in the standard python dist. Also see archive_rt.py in the above installer. --Darrell ----- Original Message ----- From: "David Huttleston Jr" > > I am resisting delivering class files created by jythonc > because it's another layer of complexity (and another source > of bugs). Ideally a signed jar could be used as a virtual > file system by jython. That would be sweet! > |
From: David H. Jr <dh...@hd...> - 2001-03-06 00:55:32
|
Thanks for your response, Charles. For the systems on our LAN your 'rsh' suggestion could work quite well. But most of our users are not under our direct control-- many users are working at home. We can, however, dictate the runtime enviroment. Currently we are distributing the alpha version of this app using a cdrom/web solution. We send a cdrom with the JRE and Jython install files, also included is a small jython script to download the latest jars from our server. For the java classes, this works quite well. But I am less satisfied with the jython situation. The only solution I have thought of so far is to have the client download a signed jar and unpack it to the file system. Then when a script is run the java framework checks the integrity of the script by comparing to known MD5 hashs stored on the server. Yuck. This would be a nightmare for imports and such. I am resisting delivering class files created by jythonc because it's another layer of complexity (and another source of bugs). Ideally a signed jar could be used as a virtual file system by jython. That would be sweet! Thanks again, Dave On Mon, 05 Mar 2001 15:44:02 -0700, you wrote: > If you have progs on other machines that you want to > start running, without knowing the details of what > you are doing, one way is just to "rsh" them into > existence and have them call back (via sockets) > to the master node/dispatching machine, which can > be running a daemon-communications server to handle > subsequent communications. You can mess around with > permissions to beef up security (like setuid to > certain user when run). > > Charles > > > David Huttleston Jr wrote: > > > > Hey Jythoneers, > > I am looking for ideas to deploy a distributed > > app in a secure fashion. We are using jython for the > > client gui and logic, and java for the server and > > communication framework. > > > > A few notes: > > 1) We are free to install JDK1.3 and Jython on all > > clients. > > 2) We must make sure a script can not be run if it has > > been modified. > > 3) We must be able to conveniently deliver new versions > > over the web, but we are flexible as to how. > > > > Obviously, a signed Jar is designed to solve these issues. > > Is there a way to deploy jython programs without > > compiling them and using a signed Jar? > > > > Thanks, > > Dave > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > http://lists.sourceforge.net/lists/listinfo/jython-users > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: David H. Jr <dh...@hd...> - 2001-03-06 00:53:15
|
Thanks for your response, Charles. For the systems on our LAN your 'rsh' suggestion could work quite well. But most of our users are not under our direct control-- many users are working at home. We can, however, dictate the runtime enviroment. Currently we are distributing the alpha version of this app using a cdrom/web solution. We send a cdrom with the JRE and Jython install files, also included is a small jython script to download the latest jars from our server. For the java classes, this works quite well. But I am less satisfied with the jython situation. The only solution I have thought of so far is to have the client download a signed jar and unpack it to the file system. Then when a script is run the java framework checks the integrity of the script by comparing to known MD5 hashs stored on the server. Yuck. This would be a nightmare for imports and such. I am resisting delivering class files created by jythonc because it's another layer of complexity (and another source of bugs). Ideally a signed jar could be used as a virtual file system by jython. That would be sweet! Thanks again, Dave On Mon, 05 Mar 2001 15:44:02 -0700, you wrote: > If you have progs on other machines that you want to > start running, without knowing the details of what > you are doing, one way is just to "rsh" them into > existence and have them call back (via sockets) > to the master node/dispatching machine, which can > be running a daemon-communications server to handle > subsequent communications. You can mess around with > permissions to beef up security (like setuid to > certain user when run). > > Charles > > > David Huttleston Jr wrote: > > > > Hey Jythoneers, > > I am looking for ideas to deploy a distributed > > app in a secure fashion. We are using jython for the > > client gui and logic, and java for the server and > > communication framework. > > > > A few notes: > > 1) We are free to install JDK1.3 and Jython on all > > clients. > > 2) We must make sure a script can not be run if it has > > been modified. > > 3) We must be able to conveniently deliver new versions > > over the web, but we are flexible as to how. > > > > Obviously, a signed Jar is designed to solve these issues. > > Is there a way to deploy jython programs without > > compiling them and using a signed Jar? > > > > Thanks, > > Dave > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > http://lists.sourceforge.net/lists/listinfo/jython-users > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: David H. Jr <dh...@hd...> - 2001-03-06 00:52:48
|
Thanks for your response, Charles. For the systems on our LAN your 'rsh' suggestion could work quite well. But most of our users are not under our direct control-- many users are working at home. We can, however, dictate the runtime enviroment. Currently we are distributing the alpha version of this app using a cdrom/web solution. We send a cdrom with the JRE and Jython install files, also included is a small jython script to download the latest jars from our server. For the java classes, this works quite well. But I am less satisfied with the jython situation. The only solution I have thought of so far is to have the client download a signed jar and unpack it to the file system. Then when a script is run the java framework checks the integrity of the script by comparing to known MD5 hashs stored on the server. Yuck. This would be a nightmare for imports and such. I am resisting delivering class files created by jythonc because it's another layer of complexity (and another source of bugs). Ideally a signed jar could be used as a virtual file system by jython. That would be sweet! Thanks again, Dave On Mon, 05 Mar 2001 15:44:02 -0700, you wrote: > If you have progs on other machines that you want to > start running, without knowing the details of what > you are doing, one way is just to "rsh" them into > existence and have them call back (via sockets) > to the master node/dispatching machine, which can > be running a daemon-communications server to handle > subsequent communications. You can mess around with > permissions to beef up security (like setuid to > certain user when run). > > Charles > > > David Huttleston Jr wrote: > > > > Hey Jythoneers, > > I am looking for ideas to deploy a distributed > > app in a secure fashion. We are using jython for the > > client gui and logic, and java for the server and > > communication framework. > > > > A few notes: > > 1) We are free to install JDK1.3 and Jython on all > > clients. > > 2) We must make sure a script can not be run if it has > > been modified. > > 3) We must be able to conveniently deliver new versions > > over the web, but we are flexible as to how. > > > > Obviously, a signed Jar is designed to solve these issues. > > Is there a way to deploy jython programs without > > compiling them and using a signed Jar? > > > > Thanks, > > Dave > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > http://lists.sourceforge.net/lists/listinfo/jython-users > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: charles c. <cc...@ps...> - 2001-03-05 22:41:28
|
If you have progs on other machines that you want to start running, without knowing the details of what you are doing, one way is just to "rsh" them into existence and have them call back (via sockets) to the master node/dispatching machine, which can be running a daemon-communications server to handle subsequent communications. You can mess around with permissions to beef up security (like setuid to certain user when run). Charles David Huttleston Jr wrote: > > Hey Jythoneers, > I am looking for ideas to deploy a distributed > app in a secure fashion. We are using jython for the > client gui and logic, and java for the server and > communication framework. > > A few notes: > 1) We are free to install JDK1.3 and Jython on all > clients. > 2) We must make sure a script can not be run if it has > been modified. > 3) We must be able to conveniently deliver new versions > over the web, but we are flexible as to how. > > Obviously, a signed Jar is designed to solve these issues. > Is there a way to deploy jython programs without > compiling them and using a signed Jar? > > Thanks, > Dave > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: David H. Jr <dh...@hd...> - 2001-03-05 20:30:08
|
Hey Jythoneers, I am looking for ideas to deploy a distributed app in a secure fashion. We are using jython for the client gui and logic, and java for the server and communication framework. A few notes: 1) We are free to install JDK1.3 and Jython on all clients. 2) We must make sure a script can not be run if it has been modified. 3) We must be able to conveniently deliver new versions over the web, but we are flexible as to how. Obviously, a signed Jar is designed to solve these issues. Is there a way to deploy jython programs without compiling them and using a signed Jar? Thanks, Dave |
From: Michael R. <ro...@ct...> - 2001-03-01 09:37:04
|
Hi Steve, just for reference, I recently spent an evening playing with the Cocoa Java classes from the Jython interpreter. It all worked, except that it soon became apparent how much work Interface Builder actually does behind the scenes. I'm no Cocoa expert, but it looked as if there are a nontrivial amount of bookkeeping type of classes required in a Cocoa app that IB takes care of automatically and it isn't at all obvious to me what calls to make in the interpreter. On the other hand, the experience was positive enough to start thinking about how to use Jython with IB. best Michael ************************************************ Assoc. Prof. Michael Rose Center for Tele-Information, Technical University of Denmark (45) 45 25 51 72 mailto:ro...@ct... Off the Desktop - http://converge.cti.dtu.dk/news 'and what is the use of a computer' thought Alice 'without pictures or conversation' with apologies to Lewis Carroll ************************************************* |
From: Barry H. <b.h...@sc...> - 2001-03-01 09:17:35
|
Thanks for that. It seems I was using a CVS version of jython, which didn't include traceback. I've switched to the 2.0 release version and all seems well. cheers Barry On Wed, 28 Feb 2001, Ype Kingma wrote: > Barry, > you wrote: > > > >I'd like to do something like the following in jython > > > >import traceback > >try: > >#... > >except: > > traceback.print_exc() > > > >But the module traceback doesn't seem to be included in jython. Instead I use > >something like > > Module traceback works fine for me under jython 2.0. > The other day I was bitten by this: > > import sys. traceback > > which gives a somewhat confusing error message about > traceback module not found, or something like that. > The fix was to use a comma instead of a dot. > I hope your case is about as simple. When not do a > > import sys > print sys.path > > and check that the traceback.py module is on the path (in > "jythondir"/Lib IIRC) > > Good luck, > Ype > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: <bc...@wo...> - 2001-02-28 21:21:18
|
[Steven D. Majewski] >... >I changed the jython shell script to add the path: > >/System/Library/Frameworks/JavaVM.framework/Versions/1.2/Home/bin/java >-Dpython.home=/Users/sdm7g/jython-2.0 -classpath >"/Users/sdm7g/jython-2.0/jython.jar:/System/Library/Java:$CLASSPATH" org.python.util.jython >"$@" > > >I don't know anything about how the installer works -- if there is a place >for platform dependent mods, it might be nice to add that. At the moment the MacOSX is considered a unix from the installer POV. >(Also: strictly >speaking, the initial path OUGHT to be: > /System/Library/Frameworks/JavaVM.framework/Home/bin/java >which is symbolically linked to the current version. This script works, >but it won't antomatically track any Java upgrades. If it's not simple >to change, The installer uses the java.home property directly AFAICT. If the value there isn't the right one, there is nothing the installer can about it. Please try this >>> import java >>> java.lang.System.getProperty("java.home") 'I:\\JAVA\\JDK1.3\\jre' >>> >you might just want to keep it in mind as another possible >FAQ -- you may need to reinstall jython if you upgrade Java VM. ) > > >I was able to get a slightly modified version of one of my PyObjC >AppKit test programs to work in Jython. The main difference is >that the CPython <-> Objective-C bridge does a different name >mangling than the Java bridge does. PyObjC tries to pythonify >the objective-C method names -- for example > >the objective-c statement: > > [ win initWithContentRect:rect styleMask:mask backing:YES defer:NO ]; > >actually uses the message selector: > > initWithContentRect:style:Mask:backing:defer: > >which gets name mangled by PyObjC to: > > win.initWithContentRect_styleMask_backing_defer_ (frame, mask, YES, NO ) > > >but Jython gets to use the Java bridge's use of Java overloading of >different polymorphic versions of the same method name (so there are >a couple of different initWithContentRect 's with different numbers >of args. ). > >In Jython: > > win.initWithContentRect( frame, mask, YES, NO ) > > >( I don't know yet what happens when there are are two objective-c > methods with the same number but different args. ) Jython will succesfully call the correct method. It works flawlessly in 99.9% of all cases. For some of the remaining cases a helper object can be used to specify which overloaded function to call. See: http://www.jython.org/docs/usejava.html section "Overloaded Java Method Signatures" For the remaining cases, like this: void foo(int x); void foo(Integer x); jython picks one, and there is no way to select. >I think there was some discussion on the old pyobjc-sig mailing list >on whether or not to attempt this sort of overloading or to keep the >more explicit name transformation. We may wish to revisit this >decision -- it would be nice to have the same Cocoa bindings for Jython >and CPython+PyObjC. The pure pleasure of having overloading just work suggest that it is worth the additional implementation. The ability of calling overloaded java methods from jython without any manual mangling, was a fundamental necessity for jython's success. OTOH, there is a performance issue, at least with the way Jython implements overloaded methods. Overloaded methods are sorted according to the precedents of the arguments and when a method is called, the runtime will attempt to coerce the actual arguments into the argument that each of the overloaded java method expect. If there is a lot of overloaded method with the same number of args, all the coercion attempts will take time. As an example look at String.valueOf method: >>> import java >>> java.lang.String.valueOf <java function valueOf at 5314727> >>> java.lang.String.valueOf.argslist <list of java methods that the argument will be attempted coerced into> regards, finn |
From: Ype K. <yk...@xs...> - 2001-02-28 18:53:51
|
Barry, you wrote: > >I'd like to do something like the following in jython > >import traceback >try: >#... >except: > traceback.print_exc() > >But the module traceback doesn't seem to be included in jython. Instead I use >something like Module traceback works fine for me under jython 2.0. The other day I was bitten by this: import sys. traceback which gives a somewhat confusing error message about traceback module not found, or something like that. The fix was to use a comma instead of a dot. I hope your case is about as simple. When not do a import sys print sys.path and check that the traceback.py module is on the path (in "jythondir"/Lib IIRC) Good luck, Ype |
From: Steven D. M. <sd...@vi...> - 2001-02-28 16:37:02
|
On Wed, 28 Feb 2001, Finn Bock wrote: > >% cd jython-2.0/ > >% setenv CLASSPATH /System/Library/Java/ > > I wonder, would other java programs which access Cocoa, also need this > setenv? > > It is possible that ordinary java programs don't need it, in which case > your solution is a good answer to a faq. Since I didn't see any mention of this setting in Apple's Java/Cocoa examples, I'm guessing that if you use ProjectBuilder/InterfaceBuilder (Apple's GUI developer frontend tools -- which the example code does use) it probably gets magically taken care of for you, but if you use command-line javac/java tools, it needs to be told where to look. ( I'll test the assumption when I have a chance ) I changed the jython shell script to add the path: /System/Library/Frameworks/JavaVM.framework/Versions/1.2/Home/bin/java -Dpython.home=/Users/sdm7g/jython-2.0 -classpath "/Users/sdm7g/jython-2.0/jython.jar:/System/Library/Java:$CLASSPATH" org.python.util.jython "$@" I don't know anything about how the installer works -- if there is a place for platform dependent mods, it might be nice to add that. (Also: strictly speaking, the initial path OUGHT to be: /System/Library/Frameworks/JavaVM.framework/Home/bin/java which is symbolically linked to the current version. This script works, but it won't antomatically track any Java upgrades. If it's not simple to change, you might just want to keep it in mind as another possible FAQ -- you may need to reinstall jython if you upgrade Java VM. ) I was able to get a slightly modified version of one of my PyObjC AppKit test programs to work in Jython. The main difference is that the CPython <-> Objective-C bridge does a different name mangling than the Java bridge does. PyObjC tries to pythonify the objective-C method names -- for example the objective-c statement: [ win initWithContentRect:rect styleMask:mask backing:YES defer:NO ]; actually uses the message selector: initWithContentRect:style:Mask:backing:defer: which gets name mangled by PyObjC to: win.initWithContentRect_styleMask_backing_defer_ (frame, mask, YES, NO ) but Jython gets to use the Java bridge's use of Java overloading of different polymorphic versions of the same method name (so there are a couple of different initWithContentRect 's with different numbers of args. ). In Jython: win.initWithContentRect( frame, mask, YES, NO ) ( I don't know yet what happens when there are are two objective-c methods with the same number but different args. ) I think there was some discussion on the old pyobjc-sig mailing list on whether or not to attempt this sort of overloading or to keep the more explicit name transformation. We may wish to revisit this decision -- it would be nice to have the same Cocoa bindings for Jython and CPython+PyObjC. -- Steve Majewski |
From: Barry H. <b.h...@sc...> - 2001-02-28 14:39:38
|
Hi I'd like to do something like the following in jython import traceback try: #... except: traceback.print_exc() But the module traceback doesn't seem to be included in jython. Instead I use something like import sys try: #... except Exception, detail: print sys.exc_info()[0] , detail print(sys.exc_info()[2]).dumpStack() But is there a better way? ie, is there an equivalent to traceback in jython ? cheers Barry |
From: Parvathini S G. <par...@mi...> - 2001-02-28 14:07:22
|
Hi All, I am trying to download jython-2.0.class on Windows-2000. After downloading i am getting 62.4k sized jython-2.0.class. Let me know if you have one = more source to download. One more, Is there any library module to interact with the EJB which = is running in weblogic server. Thanks in advance, Gangadhar |
From: <bc...@wo...> - 2001-02-28 13:14:43
|
[Steven D. Majewski] >Nevermind -- found them. Cool. >They're not in a jar and they're not in: > /System/Library/Frameworks/JavaVM.framework/Classes >with the other java, com.sun & com.apple classes, but in >separate class files in /System/Library/Java. > >ls /System/Library/Java/com/apple/ >cocoa misc net security util > > >% cd jython-2.0/ >% setenv CLASSPATH /System/Library/Java/ I wonder, would other java programs which access Cocoa, also need this setenv? It is possible that ordinary java programs don't need it, in which case your solution is a good answer to a faq. regards, finn |
From: Steven D. M. <sd...@vi...> - 2001-02-26 21:20:26
|
Nevermind -- found them. They're not in a jar and they're not in: /System/Library/Frameworks/JavaVM.framework/Classes with the other java, com.sun & com.apple classes, but in separate class files in /System/Library/Java. ls /System/Library/Java/com/apple/ cocoa misc net security util % cd jython-2.0/ % setenv CLASSPATH /System/Library/Java/ % ./jython Jython 2.0 on java1.2.2 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import com.apple >>> dir() ['__doc__', '__name__', 'com'] >>> dir(com.apple) ['__name__', 'buckyball', 'cocoa', 'jdirect', 'misc', 'mrj', 'net', 'scripting', 'security', 'util'] >>> from com.apple.cocoa import foundation >>> foundation.NSBundle.allFrameworks() [ ... bunch os error messages from having no autoreleasePool class NSCFString autoreleased with no pool in place - just leaking Feb 26 16:17:49 java[420] *** _NSAutoreleaseNoPool(): Object 0x8928350 ... ] ( NSBundle </System/Library/Frameworks/Foundation.framework> (loaded), NSBundle </usr/lib/java> (loaded), NSBundle </usr/lib> (loaded), NSBundle </System/Library/Frameworks/JavaVM.framework> (loaded) ) >>> -- Steve |
From: Steven D. M. <sd...@vi...> - 2001-02-26 17:37:24
|
OK -- I know I was one of several people who suggested that one ought to be able to access macosx Cocoa classes from Jython, however, now that I've actually tried to do it, I can't seem to find those classes anywhere. Importing com.apple.cocoa (or com.apple.cocoa.foundation) doesn't work: Jython 2.0 on java1.2.2 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import com.apple.cocoa Traceback (innermost last): File "<console>", line 1, in ? ImportError: No module named cocoa >>> import com.apple >>> dir(com.apple) ['__name__', 'buckyball', 'jdirect', 'mrj', 'scripting'] >>> And looking in the jar-files, I can't find it either. I'm guessing this has something to do with cocoa being implemented by the special java<->objective-c bridge. Anybody else got it working? Any clues? -- Steve Majewski |
From: John M. <joh...@ya...> - 2001-02-26 02:28:17
|
Thanks. That got me searching again. Here's a recent one (Oct, 2000) from Sun that's free "for NON-COMMERCIAL or COMMERCIAL purposes". http://developer.java.sun.com/developer/technicalArticles/Programming/sprintf/ --- Scott Schenkein <sch...@vi...> wrote: > Here is a widley used implementation of printf in java: > > http://www.braju.com/ > > Scott > __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |
From: vitaly k. <try...@ya...> - 2001-02-25 06:52:37
|
I just installed jython on my second Linux machine, and although the installation seems identical to the first, the "up arrow" on the keyboard doesn't scroll through the input buffer of the interactive session anymore but gives ^]]A (with other arrows producing B,C, and D). What's the trick, please? Vitaly __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |
From: Jan D. <jd...@ma...> - 2001-02-25 03:43:31
|
John Mudd wrote: > > Any comments on the following. I'm translating Jython code to Java and > I need help formatting numbers. Is the printf-style formatting code in > Jython available on a stand-alone basis? Any suggestions? Implementing printf-style formatting schouldn't take more than a few pages of code. I wrote something like it in C++ once, because the standard printf could deal only with basic types. It took surprisingly little code, even though it supported all printf-features. It was built on top of the C++ stream I/O facilities, making the job easier, but I assume similar basic I/O formatting facilities exist in Java. So if you can't really find code implementing printf in Java, just implement it yourself. Besides that, as far as I understand I would think there's no problem in reusing the Jython implementation (provided you give proper credit to it's source here and there) ... but then again, I'm not a lawyer! Regards, Jan |
From: John M. <joh...@ya...> - 2001-02-25 03:12:37
|
Any comments on the following. I'm translating Jython code to Java and I need help formatting numbers. Is the printf-style formatting code in Jython available on a stand-alone basis? Any suggestions? --- John Mudd <joh...@ya...> wrote: > Date: Sat, 24 Feb 2001 19:09:38 -0800 (PST) > From: John Mudd <joh...@ya...> > Subject: Java printf > To: xxxxxxxxxxxxxxxxxxxxxxx > > This is the best printf answer I've seen so far. See FAQ answer down > below. > > Hmmm... I wonder what others on my project use?? Hmmm... Jython has > the print format capability built-in. It looks like it's in > org/python/core/PyString.java. But I can't just steal that code... > even though I'm free to use Jython as a whole? Hmmm... or can I? > > > The Lava jprintf license is only $100 for source. The web page says > it's "the best". > > I downloaded the horstmann code. Here's a sample from Jython > interpreter sesion. Good enough but... [[[ Permission to use, copy, > modify, and distribute this software and its documentation for > NON-COMMERCIAL purposes ]]]. Ugh... I technically can't use it. > > > Linux: /home/mudd/misc[1] jython > Jython 2.0 on java1.2.2-RC2 (JIT: javacomp) > Type "copyright", "credits" or "license" for more information. > >>> import Format > >>> Format('%05d').form(123) > '00123' > >>> Format('------>%05d<-------').form(123) > '------>00123<-------' > >>> > > > Oh! Try to format stuff using native Java crap. This might be the > best example of weakness in Java. Geez! > > > > > --- > > FAQ: > http://www.landfield.com/faqs/computer-lang/java/programmers/faq/ > > --- > > 13. (Sect. 7) How do I do formatted I/O of floating point numbers? > > [*] Use the class java.text.NumberFormat. > > Or use http://www.newbie.net/sharky/lava/. Or use Cay > Horstmann's > http://www.horstmann.com/corejava/Format.java > Although many utilities claim to handle all varieties of C's > printf, as > far as has been found, this is the only one to correctly handle > the > equivalent of %e in printf. > > See also the standard packages java.text.DecimalFormat and > java.text.NumberFormat > > __________________________________________________ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |
From: D-Man <ds...@ri...> - 2001-02-24 21:22:47
|
On Sat, Feb 17, 2001 at 10:59:26AM -0800, Eli Ateljevich wrote: | Hi. I have inherited a jpython application that makes use of user-defined | java time series classes. These classes have overloaded operators that do | pretty much what you would expect. For instance, given a time series x and | a time series y, x+y returns a new time series with the elements of x and y | added at corresponding times. | | It would be very useful to be able to define x>y the same way. However, | when I write my own __cmp__ method jpython ignores it. The results from You should use jython instead of jpython. | x>y | are an arbitrary scalar value, as if I had left comparisons undefined. If I | call my method directly by name: | x.__cmp__(y) | it works fine. Any advice? | I just realized what is wrong here. x>y doesn't call __cmp__, but __gt__ instead I think it would be good to RTFM some more. Find out where __cmp__ is used (list.sort uses it) and where __gt__, __lt__, etc. are used. (I don't know, so I can't help any more than this, but the Fine Manual can ;-)) HTH, -D |
From: D-Man <ds...@ri...> - 2001-02-23 22:32:49
|
On Fri, Feb 23, 2001 at 01:44:16PM -0800, John Mudd wrote: | Just add the following at the top of yout Jython script to fix the | problem! | | from java.lang import Exception | I wouldn't recommend this since its name clashes with Python's builtin Exception. Instead I would use : try : pass except java.lang.Exception , error : pass or from java.lang import Exception as JavaException try : pass except JavaException , error : pass -D |
From: John M. <joh...@ya...> - 2001-02-23 21:43:08
|
Just add the following at the top of yout Jython script to fix the problem! from java.lang import Exception --- John Mudd <joh...@ya...> wrote: > I'm trying to use an exception (written in java) in my jython code. > But I seem to get an error. Any suggestions? > > > > $ cat MyException.java > class MyException extends Exception { > int Code; > String Description; > > public MyException(int Code, String Description) { > //super(); > > this.Code = Code; > this.Description = Description; > } > > public String toString() { > return "MyException: Code=" + Code + ", Description=" + > Description; > } > } > > > $ javac MyException.java > > > $ cat testException.py > #! /usr/bin/env jython > > import MyException > > try: > #raise MyException(-1, 'xxxxxxxxx') > de = MyException(-1, 'xxxxxxxxx') > print 'de=%s' % `de` > raise de > except Exception, e: > print 'e=%s' % `e` > > > $ testException.py > de=MyException: Code=-1, Description=xxxxxxxxx > Traceback (innermost last): > File "testException.py", line 9, in ? > MyException: Code=-1, Description=xxxxxxxxx > at java.lang.reflect.Constructor.newInstance(Native Method) > at > org.python.core.PyReflectedConstructor.__call__(PyReflectedConstructor.java:125) > at > org.python.core.PyJavaInstance.__init__(PyJavaInstance.java:61) > at org.python.core.PyJavaClass.__call__(PyJavaClass.java:786) > at org.python.core.PyObject.__call__(PyObject.java:285) > at org.python.pycode._pyx0.f$0(testException.py) > at org.python.pycode._pyx0.call_function(testException.py) > at org.python.core.PyTableCode.call(PyTableCode.java:155) > at org.python.core.Py.runCode(Py.java:1055) > at org.python.core.__builtin__.execfile(__builtin__.java:288) > at org.python.core.__builtin__.execfile(__builtin__.java:292) > at > org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155) > at org.python.util.jython.main(jython.java:159) > > MyException: MyException: Code=-1, Description=xxxxxxxxx > $ > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - Buy the things you want at great prices! > http://auctions.yahoo.com/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ |
From: John M. <joh...@ya...> - 2001-02-23 21:23:26
|
I'm trying to use an exception (written in java) in my jython code. But I seem to get an error. Any suggestions? $ cat MyException.java class MyException extends Exception { int Code; String Description; public MyException(int Code, String Description) { //super(); this.Code = Code; this.Description = Description; } public String toString() { return "MyException: Code=" + Code + ", Description=" + Description; } } $ javac MyException.java $ cat testException.py #! /usr/bin/env jython import MyException try: #raise MyException(-1, 'xxxxxxxxx') de = MyException(-1, 'xxxxxxxxx') print 'de=%s' % `de` raise de except Exception, e: print 'e=%s' % `e` $ testException.py de=MyException: Code=-1, Description=xxxxxxxxx Traceback (innermost last): File "testException.py", line 9, in ? MyException: Code=-1, Description=xxxxxxxxx at java.lang.reflect.Constructor.newInstance(Native Method) at org.python.core.PyReflectedConstructor.__call__(PyReflectedConstructor.java:125) at org.python.core.PyJavaInstance.__init__(PyJavaInstance.java:61) at org.python.core.PyJavaClass.__call__(PyJavaClass.java:786) at org.python.core.PyObject.__call__(PyObject.java:285) at org.python.pycode._pyx0.f$0(testException.py) at org.python.pycode._pyx0.call_function(testException.py) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.Py.runCode(Py.java:1055) at org.python.core.__builtin__.execfile(__builtin__.java:288) at org.python.core.__builtin__.execfile(__builtin__.java:292) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155) at org.python.util.jython.main(jython.java:159) MyException: MyException: Code=-1, Description=xxxxxxxxx $ __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/ |