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-07-12 13:23:22
|
Hi. [Jim Aldrig] > Mark Ackerman wrote: > > > > I've got an embedded Jython interpretor as my glue in a java program. > > I'm trying to do an exec or eval (both actually), sending an entire program > > in as a string. It's not working. I can use the exact same program as > > a file using execfile, and then it's fine. > > > > Any suggestions? I'm using \n as my line delimiter, if that helps. > > It doesn't work like that: 'exec' only takes one 'unit' of code; Just to avoid confusion, that's false. interp.exec takes the same arg "as" the exec statement: http://www.python.org/doc/current/ref/exec.html e.g. the following example works for me: import org.python.util.* ; public class interp { public static void main(String[] args) { PythonInterpreter interp = new PythonInterpreter(); String x = "a,b=1,1\nif a:\n print 3\nif b:\n print 5"; interp.exec(x); } } Clearly one should pay attention to indentation. Passing chunks of code, e.g. incomplete compound statements does not work, OTOH. regards, Samuele Pedroni. |
From: Samuele P. <pe...@in...> - 2001-07-12 12:54:42
|
Hi. [mhagger] > > It doesn't help: > > $ jython > Jython 2.0 on java1.3.1 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> import testlib > >>> print testlib > testlib > >>> print testlib.B > testlib.B > >>> print testlib.B.C > Traceback (innermost last): > File "<console>", line 1, in ? > AttributeError: class 'testlib.B' has no attribute 'C' > >>> > Your troubles are of a buggy nature. I have added a bug report: "using nested java cls @ level >2 fails" http://sourceforge.net/tracker/index.php?func=detail&aid=440660&group_id=12867&atid=112867 Thanks for the report. regards, Samuele Pedroni. |
From: Kevin M. <qk...@lm...> - 2001-07-12 12:13:42
|
How do I apply constraints to a GridBag? >>> from pawt import swing, awt, GridBag >>> >>> frame = swing.JFrame() >>> c = awt.GridBagConstraints() >>> button = swing.JButton() >>> gridbag = GridBag(frame.contentPane) >>> gridbag.setConstraints(button,c) Traceback (innermost last): File "<console>", line 1, in ? AttributeError: setConstraints >>> _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 E-Mail : kev...@er... |
From: daChosen O. <a_...@ho...> - 2001-07-12 08:33:39
|
Hello, I am a new Zope user and am looking to embark on a project using the aboved-named configuration. I have already configured Apache to pass request for Zope Content to the ZServer. The snag I have is actually doing the scripting with Jython and Java classes as opposed to Python/Perl. The materials available on Zope are geared towards setting up for Python. There seem not to be any materials on setting up the back-end (Zope-MySQL) for Jython/Java development. Has anyone tried this combination before ? If so would require some assistance on setting up. Thanks in Anticipation, da Chosen1 _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. |
From: Steve Y. <st...@ca...> - 2001-07-12 05:53:00
|
Hi folks, I've been using Jython for well over a year, and it has served me faithfully without a hitch. I'm using it in an online role-playing game (http://www.cabochon.com) with thousands of active players, and I use my embedded jython interpreter(s) literally every day. I've run across an interesting problem. My game object tree has a base class (GameObject) that has a hashtable of properties, and one of the possible property values is type boolean. Usually jython figures out what I'm trying to do and converts the value '0' to Java's 'false'. I've found a case where it doesn't work: from java.lang import Boolean ... obj.setProperty("foobar", Boolean.FALSE) I also tried: obj.setProperty("foobar", 0) but that somehow turns 0 into an int value and uses that, where I really wanted a boolean. My base class has the following relevant methods: public void setIntProperty(String name, int value) public void setProperty(String name, Object value) (Notice how I've basically cloned jython's object-property list in java - I started before jython was availible. Sorry.) Presumably it's the second method that's being invoked here. So when I try to setProperty with Boolean.FALSE, jython somehow actually converts the Boolean.FALSE to a zero, and then winds up setting the property with an int value of 0 instead of a boolean value of true. Unfortunately, that dorks my code that's expecting the value to be a boolean. In case you were wondering, it means I can't uncurse certain rings in the game - funny how these issues translate into real bugs. Sooo... is there any way to force jython to invoke my method with a value that corresponds to the Java boolean value of 'false', rather than an int zero? Thanks much, -steve |
From: Jim A. <ji...@tr...> - 2001-07-12 02:38:58
|
Mark Ackerman wrote: > > I've got an embedded Jython interpretor as my glue in a java program. > I'm trying to do an exec or eval (both actually), sending an entire program > in as a string. It's not working. I can use the exact same program as > a file using execfile, and then it's fine. > > Any suggestions? I'm using \n as my line delimiter, if that helps. It doesn't work like that: 'exec' only takes one 'unit' of code; although you can define a function like this: interp.exec( "def prt(x): \n" + " print x \n" + " for i in x: \n" + " print i, \n" + " print x.__class__\n"); (from Bruce Eckel's 'Thinking in Patterns' chap 9, the 'Interpreter Pattern'; worth downloading from http://www.mindview.net/Books/TIPatterns/ ) or multi-line if/for statements. But other than that you can't run multiple lines: that is what 'execfile' is for. Note that 'execfile' DOES take an InputStream so you can send it code from any source. Or just put 'exec' in a loop. Of course 'eval' takes only an EXPRESSION (and returns a result...). -- __o Jim Adrig _ \<,_ ji...@tr... ' `/ ' ` ___________ `-' `-' "There are many ways of moving forward, but only one way of standing still." - Franklin D. Roosevelt |
From: Mark A. <ack...@go...> - 2001-07-12 01:14:41
|
I've got an embedded Jython interpretor as my glue in a java program. I'm trying to do an exec or eval (both actually), sending an entire program in as a string. It's not working. I can use the exact same program as a file using execfile, and then it's fine. Any suggestions? I'm using \n as my line delimiter, if that helps. Mark |
From: Mark A. <ack...@go...> - 2001-07-12 01:11:00
|
I've got an embedded Jython interpretor as my glue in a java program. I'm trying to do an exec or eval (both actually), sending an entire program in as a string. It's not working. I can use the exact same program as a file using execfile, and then it's fine. Any suggestions? I'm using \n as my line delimiter, if that helps. Mark |
From: Michael H. <mh...@al...> - 2001-07-11 17:52:08
|
D-Man writes: > Instead try this and see if it helps : > > #!/usr/bin/env jython > import testlib > > print testlib.B > print testlib.B.C It doesn't help: $ jython Jython 2.0 on java1.3.1 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import testlib >>> print testlib testlib >>> print testlib.B testlib.B >>> print testlib.B.C Traceback (innermost last): File "<console>", line 1, in ? AttributeError: class 'testlib.B' has no attribute 'C' >>> -- Michael Haggerty mh...@al... |
From: D-Man <ds...@ri...> - 2001-07-11 16:38:06
|
On Wed, Jul 11, 2001 at 01:40:37PM +0200, Michael Haggerty wrote: | Hello, | | I'm new to Jython and to Java, so I might be trying things that are | just nonsense. But I am having trouble importing and using | multiply-nested java classes using jython. The following illustrates | the problem: | In test.py: | | #! /usr/bin/env jython | | import testlib | import testlib.B | import testlib.B.C import is usually only used with modules or packages. With Jython, however, you can import top-level classes. Instead try this and see if it helps : #!/usr/bin/env jython import testlib print testlib.B print testlib.B.C | Otherwise I've been astounded how easy it is to use Jython and Java | together, and we will probably start using it on a medium-big project | at work. Sounds good! IMO Python (Jython) is much easier to use than Java. -D |
From: Michael H. <mh...@al...> - 2001-07-11 09:38:36
|
Hello, I'm new to Jython and to Java, so I might be trying things that are just nonsense. But I am having trouble importing and using multiply-nested java classes using jython. The following illustrates the problem: In testlib.java: public class testlib { static public class B { static public class C { public C() { System.out.print("This must be working!\n"); } } } } In test.java: import testlib.B.C; public class test { static public void main(String[] args) { } } In test.py: #! /usr/bin/env jython import testlib import testlib.B import testlib.B.C Try to run it: $ JIKESPATH=.:$JIKESPATH jikes testlib.java test.java $ java test This must be working! $ jython test.py Traceback (innermost last): File "test.py", line 5, in ? ImportError: No module named C $ I thought this should import the C class from jython, but it doesn't seem to work. Could the problem be that it is doubly-nested (i.e., the .class file has two '$' in it)? Otherwise I've been astounded how easy it is to use Jython and Java together, and we will probably start using it on a medium-big project at work. Thanks, Michael -- Michael Haggerty mh...@al... |
From: Kevin M. <qk...@lm...> - 2001-07-11 08:11:48
|
The solution is a bit more complicated it seems. The following works well. from java.io import * from java.lang import * proc = Runtime.getRuntime().exec("ls -la") stdin = proc.getInputStream() isr = InputStreamReader(stdin) br=BufferedReader(isr) line = br.readLine() while line != None : print(line) line = br.readLine() I got some help from this resource: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html Comments? On Tue, 10 Jul 2001, D-Man wrote: > On Tue, Jul 10, 2001 at 03:44:54PM +0200, Kevin McNamee wrote: > | OK, this works, but it just returns '0'. I guess this the return code from > | the 'ls -al' command. Where is the actual output? > > Yep. That means that the command completed successfully (at least > that's the convention on *nix). > > See > http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Process.html. > java.lang.Runtime.exec returns a java.lang.Process object to you. > That Process object has methods > > getOutputStream() > getInputStream() > getErrorStream() > exitValue() > > You are looking to getOutputStream from the Process. The waitFor > method returns the exitValue. > > HTH, > -D > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 E-Mail : kev...@er... |
From: D-Man <ds...@ri...> - 2001-07-10 15:32:04
|
On Tue, Jul 10, 2001 at 03:44:54PM +0200, Kevin McNamee wrote: | OK, this works, but it just returns '0'. I guess this the return code from | the 'ls -al' command. Where is the actual output? Yep. That means that the command completed successfully (at least that's the convention on *nix). See http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Process.html. java.lang.Runtime.exec returns a java.lang.Process object to you. That Process object has methods getOutputStream() getInputStream() getErrorStream() exitValue() You are looking to getOutputStream from the Process. The waitFor method returns the exitValue. HTH, -D |
From: Glen S. <gl...@en...> - 2001-07-10 14:14:02
|
On Tue, 10 Jul 2001, D-Man wrote: > On Tue, Jul 10, 2001 at 06:20:27AM -0700, Glen Starchman wrote: > | On Tue, 10 Jul 2001, Kevin McNamee wrote: > | > Is there no possibility to run arbitrary system commands without writing > | > Java code? > | > | > | In a nutshell, no... however, it is not Java code you will be > | writing... it will be Jython :-) > | > | For example: > | > | from java.lang import * > | Process p = Runtime.getRuntime().exec("ls -al") > ^^^^^^^ > > :-) That is Java. Jython doesn't use type declarations. My bad... I guess since I am mixing Java classes and Python classes together so much I tend to get confused from time to time. > > | p.waitFor() > > -D > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users -- So what can we do? There is only one solution. Start killing. If you know someone who is excited about compileable ASP code... KILL THEM. If you know someone who has Visual Studio .NET beta... KILL THEIR WHOLE FAMILY. -- /. posting |
From: Kevin M. <qk...@lm...> - 2001-07-10 13:45:00
|
OK, this works, but it just returns '0'. I guess this the return code from the 'ls -al' command. Where is the actual output? On Tue, 10 Jul 2001, D-Man wrote: > On Tue, Jul 10, 2001 at 06:20:27AM -0700, Glen Starchman wrote: > | On Tue, 10 Jul 2001, Kevin McNamee wrote: > | > Is there no possibility to run arbitrary system commands without writing > | > Java code? > | > | > | In a nutshell, no... however, it is not Java code you will be > | writing... it will be Jython :-) > | > | For example: > | > | from java.lang import * > | Process p = Runtime.getRuntime().exec("ls -al") > ^^^^^^^ > > :-) That is Java. Jython doesn't use type declarations. > > | p.waitFor() > > -D > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 E-Mail : kev...@er... |
From: D-Man <ds...@ri...> - 2001-07-10 13:38:21
|
On Tue, Jul 10, 2001 at 06:20:27AM -0700, Glen Starchman wrote: | On Tue, 10 Jul 2001, Kevin McNamee wrote: | > Is there no possibility to run arbitrary system commands without writing | > Java code? | | | In a nutshell, no... however, it is not Java code you will be | writing... it will be Jython :-) | | For example: | | from java.lang import * | Process p = Runtime.getRuntime().exec("ls -al") ^^^^^^^ :-) That is Java. Jython doesn't use type declarations. | p.waitFor() -D |
From: Glen S. <gl...@en...> - 2001-07-10 13:29:11
|
On Tue, 10 Jul 2001, Kevin McNamee wrote: > Is there no possibility to run arbitrary system commands without writing > Java code? In a nutshell, no... however, it is not Java code you will be writing... it will be Jython :-) For example: from java.lang import * Process p = Runtime.getRuntime().exec("ls -al") p.waitFor() |
From: Glen S. <gl...@en...> - 2001-07-10 13:18:37
|
> > Where is the 'os' module located? (I can't find it in Lib) > > /Kevin [glen@daibutsu glen]$ jython Jython 2.1a1 on java1.3.0_02 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import os >>> dir(os) ['File', '__depends__', '__doc__', '__file__', '__name__', '_exit', 'classDictInit', 'curdir', 'defpath', 'environ', 'error', 'getcwd', 'java', 'javapath', 'linesep', 'listdir', 'makedirs', 'mkdir', 'name', 'pardir', 'path', 'pathsep', 'remove', 'rename', 'rmdir', 'sep', 'stat', 'unlink'] >>> You'll notice that there is no popen defined in Jython's os module. Your best bet is to approximate it in Java using Runtime and Process, or remove that functionality from your code... ;-) |
From: Kevin M. <qk...@lm...> - 2001-07-10 13:03:30
|
Hi, Solaris 8 Jython 2.0 on java1.3.0_01 (JIT: null) >>> import commands >>> commands.getoutput ('ls') Traceback (innermost last): File "<console>", line 1, in ? File "/opt/python/jpython/Lib/commands.py", line 42, in getoutput File "/opt/python/jpython/Lib/commands.py", line 51, in getstatusoutput AttributeError: class 'org.python.modules.os' has no attribute 'popen' What's wrong? Where is the 'os' module located? (I can't find it in Lib) /Kevin _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 E-Mail : kev...@er... |
From: Glen S. <gl...@en...> - 2001-07-09 23:57:34
|
On Mon, 09 Jul 2001, Robert Kuzelj wrote: > hi, > > can anybody explain this strange behavior when > loading a folder as a resource? > > why can i load "/java/util" as a folder > but cannot load "/org/jdom" ? > > even after loading a class from "/org/jdom" i still cannot > laod the directory. I would venture to guess that it has something to do with __init__.py. I may be completely wrong, but I would guess that Jython creates a token __init__.py for the known Java libs (anything under java.* or javax.*), but not for arbitrary packages, such as org.jdom Just a guess though... > > > C:\data\develop\pyparser\src_python>jython > Jython 2.1a1 on java1.3.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> from java.lang import String > >>> > >>> res = String.getResource("/java/util") > >>> print res > jar:file:/C:/develop/java/jdk/jre/lib/rt.jar!/java/util > >>> > >>> res = String.getResource("/org/jdom") > >>> print res > None > >>> res = String.getResource("/org/jdom/Element.class") > >>> print res > jar:file:/C:/develop/java/jdom/jdom.jar!/org/jdom/Element.class > >>> > >>> from org.jdom import Element > >>> > >>> res = String.getResource("/org/jdom") > >>> print res > None > >>> > > > any help is appreciated. > > ciao robertj > > ===== > itemj > http://www.itemj.com > Robert Kuzelj > Gaissacherstrasse 7 > 81371 Muenchen > tel 0177 5302230 > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users -- So what can we do? There is only one solution. Start killing. If you know someone who is excited about compileable ASP code... KILL THEM. If you know someone who has Visual Studio .NET beta... KILL THEIR WHOLE FAMILY. -- /. posting |
From: Robert K. <rob...@ya...> - 2001-07-09 21:10:35
|
hi, can anybody explain this strange behavior when loading a folder as a resource? why can i load "/java/util" as a folder but cannot load "/org/jdom" ? even after loading a class from "/org/jdom" i still cannot laod the directory. C:\data\develop\pyparser\src_python>jython Jython 2.1a1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> from java.lang import String >>> >>> res = String.getResource("/java/util") >>> print res jar:file:/C:/develop/java/jdk/jre/lib/rt.jar!/java/util >>> >>> res = String.getResource("/org/jdom") >>> print res None >>> res = String.getResource("/org/jdom/Element.class") >>> print res jar:file:/C:/develop/java/jdom/jdom.jar!/org/jdom/Element.class >>> >>> from org.jdom import Element >>> >>> res = String.getResource("/org/jdom") >>> print res None >>> any help is appreciated. ciao robertj ===== itemj http://www.itemj.com Robert Kuzelj Gaissacherstrasse 7 81371 Muenchen tel 0177 5302230 __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ |
From: <bc...@wo...> - 2001-07-09 20:25:00
|
[syKim] >Hello.. > >I'm trying html editing tool.. > >it's nessary handling view handling. > >show that code : >----------------------------------------------------------------- >class TestEditorKit(HTMLEditorKit): > def getViewFactory(self): > return self.TestFactory() > > class TestFactory(HTMLEditorKit.HTMLFactory): > def create(self,e): > o = e.getAttributes().getAttribute(StyleConstants.NameAttribute) > if o == HTML.Tag.INPUT: > return TestFormView(e) > return HTMLEditorKit.HTMLFactory.create(self,e) That is a bug in jythonc where the base class is not recognized as a java class. I just checked in a workaround. regards, finn P.S. Your mails happens to look like this in my mailprogram: >DQoNCj5IYXZlbid0IGNvZGVkIHRoaXMsIGJ1dCB5b3UgcHJvYmFibHkgd2FudCB0byBqdXN0IHB1 >dCBUZXN0RmFjdG9yeSBhdCB0aGUgdG9wLWxldmVsIChyZW1vdmUgdGhlIG5lc3RpbmcpLg0KDQo+ >... Is there anything you can do to avoid that? |
From: syKim <re...@ne...> - 2001-07-07 05:47:11
|
DQoNCj5IYXZlbid0IGNvZGVkIHRoaXMsIGJ1dCB5b3UgcHJvYmFibHkgd2FudCB0byBqdXN0IHB1 dCBUZXN0RmFjdG9yeSBhdCB0aGUgdG9wLWxldmVsIChyZW1vdmUgdGhlIG5lc3RpbmcpLg0KDQo+ SW5uZXIgY2xhc3NlcyBpbiBKYXZhIGFyZSBtb3N0bHkganVzdCBhIHN5bnRhY3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0KICAgIGRl ZiB0ZXN0KHNlbGYpOg0KICAgICAgICBwcmludCAnaGVsbG8nDQoNCiAgICBkZWYgYWN0aW9uUGVy Zm9ybWVkKHNlbGYsZSk6DQogICAgICAgIHNlbGYudGVzdCgpDQoNCiMjIEl0J3MgcGFydCBvZiBm dWxsIHNvdXJjZQ0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0NCkkgbWFkZSAyIGNsYXNzZXMgZm9yIGhhbmRsZWluZyBodG1s IHZpZXcuDQoNClRlc3RFZGl0b3JLaXQsIFRlc3RGb3JtVmlldyBzZWVtIHJpZ2h0Lg0KDQpidXQs IFRlc3RGYWN0b3J5IChpbm5lciBjbGFzcyBvZiBIVE1MRWRpdG9yS2l0KSBpcyBub3QuDQoNCndo ZW4gSSBjb21waWxlZCB0aGUgc291cmNlIHdpdGgganl0aG9uYywgb3RoZXIgY2xhc3NlcyBhcmUg bWFkZQ0KDQpidXQsIFRlc3RGYWN0b3J5IGNsYXNzIGRpZG4ndCBtYWtlLg0KDQpUaGFua3MgZm9y IGFueSBoZWxwLi4NCg0KLS0gc3lLaW0= |
From: Amund T. <amu...@jf...> - 2001-07-06 12:04:10
|
Hi. I read the benchmark using jython together with java 1.4beta on Linux (ref: "How good is Jython", Finn Bock, 20010526), and wondered how java 1.4 with jython would perform on win2k, so I tested it. My test results of seems very promising on win2k as well (about 29% faster than CPython) , see below for my test results and test configuration. Configuration: IBM Thinkpad A20P, 700Mhz P-III, 256MB RAM with Windows 2000, Jython v2.1a1, CPython 2.1 and JDK 1.4beta I used 1000000 (10^6) iterations in Pystone in all tests, the tests were only run once so they're not statistically significant, but otherwise they are believed to be correct. 1. Results jython with java SERVER (java 1.4) virtual machine: Command: java -server -Xmx200m -Dpython.home="c:/programs/jython-2.1a1" org.python.util.jython pystone.py Time: 97.279s Benchmark: 10279.7 pystones/sec 2. Results jython with HOTSPOT (java 1.4) virtual machine: Command: jython pystone.py (hotspot is default virtual machine) Time: 149.265s Benchmark: 6699.49 pystones/sec 3. Results cpython: Command: python pystone.py Time: 125.571s Benchmark: 7952.22 pystones/sec Remark: When I tested with only 10000 (10^4) iterations, jython+java server got about 1000 pystones/sec, jython+hotspot got about 4000 pystones/sec, and cpython got about 8000 pystones/sec, so it seems that the java server virtual is a "slow learner", but with highly specialized tuning of performance over time (i.e. with more iterations). If you have any specialized (e.g. Network/Disk IO) benchmarks and performance comparisons regarding Jython, I would like to hear about it. Amund am...@jf... - http://www.jfipa.org/amund/ |