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: John G. <jgo...@co...> - 2001-09-05 19:35:14
|
bc...@wo... (Finn Bock) writes: > I suppose it depends on the viewpoint. I have never seen jythonc as a > java code generator. To me, it is a jython compiler and its main purpose > is to analyze and freeze a collection of jython code so that there is no > need for dynamic creation of bytecode. I don't see it as a Java code generator, but it *is* quite useful to be able to call Python methods from Java and to make Python methods appear to be Java methods. (Why else would there be @sig support?) -- John Goerzen <jgo...@co...> GPG: 0x8A1D9A1F www.complete.org |
From: <bc...@wo...> - 2001-09-05 19:33:12
|
[Scott Hathaway] >Thanks for the tip. That got rid of the codecs message. Now, I get a java >security error. Things work ok from jython, but when in an applet, I get >the error. An applet can only connect to the site it was downloaded from. regards, finn |
From: <bc...@wo...> - 2001-09-05 19:27:15
|
[Frank Immich] >Hello, >Pretty new to Jython, and already faced with a problem. >Anyway, looking over the demo programs that come with, and I can't get the >example helloworld, or any other, >to work. The output trace is attached. >All I found in the archive was a hint, that the classpath has to be set, but >it seems to be O.K. >Any suggestions welcomed... > >... >1 java.io.IOException: CreateProcess: >C:\Programme\JavaSoft\JRE\1.3.1\bin\javac -classpath .... It looks like jython was installed with the JRE and there is no javac compiler in the JRE. You must re-install jython and make sure that you are starting the java command from the full JDK. regards, finn |
From: <bc...@wo...> - 2001-09-05 19:20:07
|
[Bill Kelly] >I'm writing Swing code and need to provide my own paintComponent() >method, which is required to invoke super.paintComponent() in most >cases (see >http://java.sun.com/docs/books/tutorial/uiswing/converting/generaltips.html >"Converting Painting Code") - but paintComponent() is a protected >method of JComponent, and I'm unable to invoke it from my jython >paintComponent method. I see in the jython docs on subclassing: > >Calling Methods in Your Superclass > > In Python, if I want to call the foo method in my superclass, > I use the form: SuperClass.foo(self) > > This works with the majority of methods, but protected methods > cannot be called from subclasses in this way. Instead you have > to use the "self.super_foo()" call style. The docs are wrong. It should read self.super__foo() (with two underscores). >Could someone post an example of this call style? I've tried >a couple things: self.super_paintComponent() and >self.JPanel_paintComponent() but no luck with either. (JPanel >being my direct superclass.) from javax import swing class MyComponent(swing.JLabel): def __init__(self): self.setText("Hello from jython") def paintComponent(self, g): print "paintComponent" self.super__paintComponent(g) import pawt pawt.test(MyComponent()) regards, finn |
From: <bc...@wo...> - 2001-09-05 19:09:38
|
[John Goerzen] > OK, now the question is, where do I put the @sig line for Java to be > able to call [a static method], and how should it look? [Kevin Butler] > I'm pretty sure the answer is "you don't". I don't believe either cheat > is supported by jythonc. [John Goerzen] >Hmm, so there is absolutely no way to create, with jythonc, what would >appear to java as a static function? I'd consider that to be a >serious shortcoming... I suppose it depends on the viewpoint. I have never seen jythonc as a java code generator. To me, it is a jython compiler and its main purpose is to analyze and freeze a collection of jython code so that there is no need for dynamic creation of bytecode. regards, finn |
From: Ype K. <yk...@xs...> - 2001-09-05 19:09:30
|
Dimo, > >I am running into problems using the app subclass interact.py. >I would like the user to be able to enter jython language at the interactive prompt (not the >>> jython prompt, but the shell prompt created by interact.py), and have the language interpreted and executed appropriately. >To achieve this, in the InteractiveApp evalCommand method I'm using exec and eval on the user-entered commands. > >The problem is that I can't maintain continuity between separate commands. >For example, >prompt/> a = 3 >prompt/> b = a >uncaught: (<class exceptions.NameError... >... >NameError: a > >So there seems to be some namespace issue whereby I can't store the variables in the shell. >Is what I'm attempting to do possible using interact.py? I've never seen interact.py so I hope this is right: You need to pass globals/locals to the exec.... function being called. These constitute the namespace in which the exec.... function is executed. They are dictionaries mapping identifiers to values. Have fun, Ype |
From: dimo j. <di...@ho...> - 2001-09-05 18:55:23
|
In my earlier post I should have specified: I'm using the interact.py that is given as example on page 799 of Programming Python by Mark Lutz. Specifically, I'm using the InteractiveApp class to create a read-eval loop. My bad, sorry! -Dimo >From: "dimo jones" <di...@ho...> >To: jyt...@li... >Subject: [Jython-users] interact.py issues >Date: Wed, 05 Sep 2001 10:50:18 -0400 > >Hello, > >I am running into problems using the app subclass interact.py. >I would like the user to be able to enter jython language at the >interactive >prompt (not the >>> jython prompt, but the shell prompt created by >interact.py), and have the language interpreted and executed appropriately. >To achieve this, in the InteractiveApp evalCommand method I'm using exec >and >eval on the user-entered commands. > >The problem is that I can't maintain continuity between separate commands. >For example, >prompt/> a = 3 >prompt/> b = a >uncaught: (<class exceptions.NameError... >... >NameError: a > >So there seems to be some namespace issue whereby I can't store the >variables in the shell. >Is what I'm attempting to do possible using interact.py? >Note that I'm not planning on having the user enter anything more than one >line of code at a time, i.e. no while, if, etc. > >I'm a newcomer to jython and would appreciate any input, >Thanks >Dimo > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >https://lists.sourceforge.net/lists/listinfo/jython-users _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Frank I. <fra...@gm...> - 2001-09-05 17:31:52
|
Hello, Pretty new to Jython, and already faced with a problem. Anyway, looking over the demo programs that come with, and I can't get the example helloworld, or any other, to work. The output trace is attached. All I found in the archive was a hint, that the classpath has to be set, but it seems to be O.K. Any suggestions welcomed... Frank processing hw processing pawt.__init__ Required packages: java.awt java.applet Creating adapters: java.awt.event.WindowListener used in __init__ Creating .java files: hw module HelloWorld extends java.applet.Applet __init__ module Compiling .java to .class... Compiling with args: ['C:\\Programme\\JavaSoft\\JRE\\1.3.1\\bin\\javac', '-classpath', 'C:\\Programm e\\jython20\\jython.jar;;.\\jpywork;;C:\\Programme\\jython20\\Tools\\jythonc;c:\\Programme\\jython20 \\.;C:\\Programme\\jython20\\Lib;C:\\Programme\\jython20', '.\\jpywork\\hw.java', '.\\jpywork\\pawt\ \__init__.java'] 1 java.io.IOException: CreateProcess: C:\Programme\JavaSoft\JRE\1.3.1\bin\javac -classpath C:\Progr amme\jython20\jython.jar;;.\jpywork;;C:\Programme\jython20\Tools\jythonc;c:\Programme\jython20\.;C:\ Programme\jython20\Lib;C:\Programme\jython20 .\jpywork\hw.java .\jpywork\pawt\__init__.java error=2 Consider using the -C/--compiler command line switch, or setting the property python.jythonc.compiler in the registry. ERROR DURING JAVA COMPILATION... EXITING -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
From: Bill K. <bi...@ct...> - 2001-09-05 16:28:14
|
Hi, I'm writing Swing code and need to provide my own paintComponent() method, which is required to invoke super.paintComponent() in most cases (see http://java.sun.com/docs/books/tutorial/uiswing/converting/generaltips.html "Converting Painting Code") - but paintComponent() is a protected method of JComponent, and I'm unable to invoke it from my jython paintComponent method. I see in the jython docs on subclassing: Calling Methods in Your Superclass In Python, if I want to call the foo method in my superclass, I use the form: SuperClass.foo(self) This works with the majority of methods, but protected methods cannot be called from subclasses in this way. Instead you have to use the "self.super_foo()" call style. Could someone post an example of this call style? I've tried a couple things: self.super_paintComponent() and self.JPanel_paintComponent() but no luck with either. (JPanel being my direct superclass.) Thanks for your help, Bill |
From: John G. <jgo...@co...> - 2001-09-05 15:37:26
|
dman <ds...@ri...> writes: > [ Does anyone know why I keep getting these messages "from" the admin > without the proper headers? ] It looks like something is wrapping your headers and causing them to think that they've ended. Strange. |
From: dman <ds...@ri...> - 2001-09-05 15:09:07
|
[ Does anyone know why I keep getting these messages "from" the admin without the proper headers? ] (response below, entier *body* (yes, this is the body, not the headers of the message i received) included in case it helps answer the above question) On Wed, Sep 05, 2001 at 10:56:19AM -0400, jyt...@li... wrote: | (verified OK)) by pi.glockenspiel.complete.org (Postfix) | with ESMTP id 144BF3B81B; Wed, 05 Sep 2001 09:55:01 -0500 (EST) | Received: by alexanderwohl.complete.org (Postfix, from userid 1000) | id F05997F4E; Wed, 05 Sep 2001 09:55:00 -0500 (EST) | Date: Wed, 05 Sep 2001 09:55:00 -0500 | From: John Goerzen <jgo...@co...> | Subject: Re: [Jython-users] Static methods? | In-reply-to: <3B9...@ca...> | Sender: jyt...@li... | To: jyt...@li... | Errors-to: jyt...@li... | Message-id: <87b...@co...> | MIME-version: 1.0 | Content-type: text/plain; charset=us-ascii | Precedence: bulk | User-Agent: Gnus/5.090004 (Oort Gnus v0.04) XEmacs/21.4 (Artificial | Intelligence) | X-BeenThere: jyt...@li... | X-Mailman-Version: 2.0.5 | X-Original-Date: Wed, 05 Sep 2001 09:55:00 -0500 | Lines: 15 | References: <DFB...@ch...> | <3B9...@ca...> <87z...@co...> | <3B9...@ca...> | List-Post: <mailto:jyt...@li...> | List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/jython-users>, | <mailto:jyt...@li...?subject=subscribe> | List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/jython-users>, | <mailto:jyt...@li...?subject=unsubscribe> | List-Archive: <https://lists.sourceforge.net/archives//jython-users/> | List-Help: <mailto:jyt...@li...?subject=help> | List-Id: <jython-users.lists.sourceforge.net> | | Kevin Butler <kb...@ca...> writes: | | >> OK, now the question is, where do I put the @sig line for Java to be | >> able to call it, and how should it look? | > | > I'm pretty sure the answer is "you don't". I don't believe either cheat is supported by jythonc. | | Hmm, so there is absolutely no way to create, with jythonc, what would | appear to java as a static function? I'd consider that to be a | serious shortcoming... Actually, I think it is a serious shortcoming of Java that it can't have functions/methods that don't operate on specific objects at the module level. Python doesn't have the so-called "static" class members because it doesn't restrict your program organization to using only classes, but rather uses classes as object templates and modules for grouping related functions that don't operate on a given class instance. What you are seeing here is the clash between Python's and Java's concept of what an object is and what a class is. -D |
From: John G. <jgo...@co...> - 2001-09-05 14:55:03
|
Kevin Butler <kb...@ca...> writes: >> OK, now the question is, where do I put the @sig line for Java to be >> able to call it, and how should it look? > > I'm pretty sure the answer is "you don't". I don't believe either cheat is supported by jythonc. Hmm, so there is absolutely no way to create, with jythonc, what would appear to java as a static function? I'd consider that to be a serious shortcoming... -- John -- John Goerzen <jgo...@co...> GPG: 0x8A1D9A1F www.complete.org |
From: dimo j. <di...@ho...> - 2001-09-05 14:50:24
|
Hello, I am running into problems using the app subclass interact.py. I would like the user to be able to enter jython language at the interactive prompt (not the >>> jython prompt, but the shell prompt created by interact.py), and have the language interpreted and executed appropriately. To achieve this, in the InteractiveApp evalCommand method I'm using exec and eval on the user-entered commands. The problem is that I can't maintain continuity between separate commands. For example, prompt/> a = 3 prompt/> b = a uncaught: (<class exceptions.NameError... ... NameError: a So there seems to be some namespace issue whereby I can't store the variables in the shell. Is what I'm attempting to do possible using interact.py? Note that I'm not planning on having the user enter anything more than one line of code at a time, i.e. no while, if, etc. I'm a newcomer to jython and would appreciate any input, Thanks Dimo _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Kevin B. <kb...@ca...> - 2001-09-05 14:44:07
|
John Goerzen wrote: > > Kevin Butler <kb...@ca...> writes: > > > What you can do is cheat in one of two ways: > > OK, now the question is, where do I put the @sig line for Java to be > able to call it, and how should it look? I'm pretty sure the answer is "you don't". I don't believe either cheat is supported by jythonc. kb |
From: John G. <jgo...@co...> - 2001-09-05 14:01:13
|
Kevin Butler <kb...@ca...> writes: > What you can do is cheat in one of two ways: OK, now the question is, where do I put the @sig line for Java to be able to call it, and how should it look? > class XGo: > """Callable object to act as a static method""" > def __call__( self, id ): > print "called XGo(%s)" % id > > class XStatics: > def go( self, id ): > """Use the bound method as a static method""" > print "called XStatics.go(%s)" % id > # ... and other "static" methods > > > class X: > go = XGo() > __xstatics = XStatics() > go2=__xstatics.go > # ... and other static methods > > X.go( "asdf" ) > X.go2( "zxcv") > > Then executing that from emacs: > > Jython 2.1a1 on java1.3.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > ## working on region in file d:/TEMP/python-289AX1... >>>> called XGo(asdf) > called XStatics.go(zxcv) >>>> > > kb > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users -- John Goerzen <jgo...@co...> GPG: 0x8A1D9A1F www.complete.org |
From: Humbel O. <Otm...@bi...> - 2001-09-05 07:34:13
|
[ Kevin Butler ] > I imagine this is a result of the Oro Matcher changes: >=20 > http://cvs.apache.org/viewcvs/~checkout~/jakarta-oro/CHANGES?c > ontent-type=3Dtext/plain >=20 > o Perl5StreamInput and methods manipulating Perl5StreamInput have been > removed. For the technical reasons behind this decision see > "On the Use of Regular Expressions for Searching Text",=20 > Clark and Cormack, > ACM Transactions on Programming Languages and Systems, Vol=20 > 19, No. 3, > pp 413-426. That is exactly what I was looking for - thank you very much ! Oti. |
From: Humbel O. <Otm...@bi...> - 2001-09-05 07:22:57
|
[ Kevin Butler ] > Jython 2.1a1 on java1.3.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> class X: > ... def go( id ): > ... print "called:", id > ...=20 > >>> X.go( "asdf" ) > Traceback (innermost last): > File "<console>", line 1, in ? > TypeError: unbound method go() must be called with instance=20 > as first argument > >>> >=20 > The 'self' parameter is not a keyword - it is a convention. =20 > Methods on class X require an X instance: >=20 > >>> X.go( X() ) > called: <__main__.X instance at 5991085> > >>>=20 >=20 > What you can do is cheat in one of two ways: >=20 > class XGo: > """Callable object to act as a static method""" > def __call__( self, id ): > print "called XGo(%s)" % id >=20 > class XStatics: > def go( self, id ): > """Use the bound method as a static method""" > print "called XStatics.go(%s)" % id > # ... and other "static" methods >=20 >=20 > class X: > go =3D XGo() > __xstatics =3D XStatics() > go2=3D__xstatics.go > # ... and other static methods >=20 > X.go( "asdf" ) > X.go2( "zxcv") >=20 > Then executing that from emacs: >=20 > Jython 2.1a1 on java1.3.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > ## working on region in file d:/TEMP/python-289AX1... > >>> called XGo(asdf) > called XStatics.go(zxcv) > >>>=20 Please **apologize** for confusing things. I currently use both Jython and JPython in two (or more) buffers in emacs, and did not test my example with Jython 2.x, because I simply could not imagine that THIS behaviour could have changed - mea culpa ! Thank you very much for pointing out (and solving !) another upgrade issue. I am already thinking about the regex expression to find def()'s without self as first argument :-) best wishes, Oti. |
From: Scott H. <sl...@ho...> - 2001-09-05 00:09:41
|
Finn, Thanks for the tip. That got rid of the codecs message. Now, I get a java security error. Things work ok from jython, but when in an applet, I get the error. So, I guess that Java realizes that I am trying to download a file and stops it? Is there any way to do what I am trying to do (download a file without user intervention)? Thanks, Scott ----- Original Message ----- From: "Finn Bock" <bc...@wo...> To: <jyt...@li...> Cc: "Scott Hathaway" <sl...@ho...> Sent: Tuesday, September 04, 2001 2:17 PM Subject: Re: [Jython-users] is urllib compatible with jython? > [Scott Hathaway] > > >After much help from Robet Bill, I have my applet issues down to a = > >single problem. If I take out the urllib.urlretrieve calls, the applet = > >works ok. If I leave them in, it dies with a message about not being = > >able to find the codec (the exact message is below): > > > >Lookup Error: no codec search functions registered: can't find = > >encoding > > > >Does anyone know what this means and how to get around it? > > It is caused by this bug: > > > http://sourceforge.net/tracker/?group_id=12867&atid=112867&func=detail&aid=4 48523 > > where the builtin "ascii" codec wasn't found when requesting the use of > the "ASCII" codec (which is what urllib is doing). > > Try add a dummy function like this: > > def dummy_jythonc(): > import encodings.ascii > > The dummy method shouldn't be called at all. It just have to be there so > that jythonc can see it and include the codec in the resulting .jar > file. > > The bug will be fixed in the 2.1b1 release. > > regards, > finn > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Carl C. <cd...@co...> - 2001-09-04 22:39:46
|
Announcing the initial release of the Java Assignment Automarker. A hacked together piece of jython to help write automarkers for java-based university assignments. Basically, it helps you test an API for conformance. If any of you have tried to write a test harness for a java class in java, you'll know why I've used Jython. It's alpha, but I've just finished using it to mark nearly 400 stage 1 university assignments (each assignment consisted of four java classes). There's even some documentation and an example! Find it here: http://sourceforge.net/projects/automarker/ As always, bug fixes/suggestions for improvement/patches are most helpful. Cheers, -- Carl Cerecke, Assistant Lecturer|email: cd...@co... Department of Computer Science, |Phone: +64 3 364 2987 ext. 7859 University of Canterbury, |Fax: +64 3 364 2569 Private Bag 4800, |http://www.cosc.canterbury.ac.nz/~cdc Christchurch, New Zealand. | |
From: Robert W. B. <rb...@di...> - 2001-09-04 21:30:28
|
On Tue, 4 Sep 2001, Finn Bock wrote: > [Robert W. Bill] > ><snip> > >I don't know if this change in autoflushing is intentional or not. > > It is not intentional, but a result of the buffering (which give us a > sizable performance boost, especially for pickle) and the fact that > PyFiles isn't closed when exiting. > > >It's worthy of a FAQ entry or a patch depending on the > >answer to that. > > Probably both, because I don't think we can fix this problem for all > versions of java. FAQ entry #3.8 added. If only the patch was as easy <g> -rb |
From: <bc...@wo...> - 2001-09-04 19:21:56
|
[Robert W. Bill] >Hello Chris, > >Probably not pickle, but PyFile. Even without pickle, the following file >is empty: > >open('junk.txt', 'w').write('This is a test') > >Currently, an explicit close() or flush() is required on the file. e.g. > >f = open('junkpickle.txt', 'w') >pickle.dump(range(10), f) >f.close() # or flush() > >This makes the following usage a bad idea <g> > >pickle.dump(range(10), open("pickle.txt", "w")) > >Yes, this was not required in 2.0, but this is the scoop since 2.1a1. >Unfortuately, a search on PyFile in the checkins list doesn't return >any hits (crummy Geocrawler). However, The diff between the 2.0 and 2.1a1 >PyFile is sizable. I don't know if this change in autoflushing is >intentional or not. It is not intentional, but a result of the buffering (which give us a sizable performance boost, especially for pickle) and the fact that PyFiles isn't closed when exiting. >It's worthy of a FAQ entry or a patch depending on the >answer to that. Probably both, because I don't think we can fix this problem for all versions of java. regards, finn |
From: <bc...@wo...> - 2001-09-04 19:14:46
|
[Scott Hathaway] >After much help from Robet Bill, I have my applet issues down to a = >single problem. If I take out the urllib.urlretrieve calls, the applet = >works ok. If I leave them in, it dies with a message about not being = >able to find the codec (the exact message is below): > >Lookup Error: no codec search functions registered: can't find = >encoding > >Does anyone know what this means and how to get around it? It is caused by this bug: > http://sourceforge.net/tracker/?group_id=12867&atid=112867&func=detail&aid=448523 where the builtin "ascii" codec wasn't found when requesting the use of the "ASCII" codec (which is what urllib is doing). Try add a dummy function like this: def dummy_jythonc(): import encodings.ascii The dummy method shouldn't be called at all. It just have to be there so that jythonc can see it and include the codec in the resulting .jar file. The bug will be fixed in the 2.1b1 release. regards, finn |
From: dman <ds...@ri...> - 2001-09-04 18:29:35
|
On Tue, Sep 04, 2001 at 05:08:15PM +0100, Vasanthi, N (Nagalingam) wrote: | Hi, | I am testing my java applications using jython. I would like to know | how a java method which returns an primitive array be used in jython | eg) say my java method is | public int[] read() But this is in Java so it *must* be in some sort of class. This signature doesn't include "static" so you need to have an instance of the class to invoke the method on. | I want to do something like this | from jarray import array This line isn't needed. You only need to use the jarray module if you want to create a new array from jython code. | arr = read() # I am not able to do this This line tries to find an object named "read" first in the local scope of the function it is in then in the scope of the module it is in, then checks the builtins. There is no such object so the lookup fails. As noted above, you need to create an instance of the java class so that you can invoke the method on it. HTH, -D |
From: Kevin B. <kb...@ca...> - 2001-09-04 17:44:17
|
Humbel Otmar wrote: > > [ John Goerzen ] > > > > Another question (sorry about all of these!) > > > > I'm porting more Java code to Jython. I've got a case like: > > > > public static String myfunc(String id) > > > > I'm unsure how to do a static method in Jython. Do I declare it in my > > .py oustide the class: area with a @sig that has static in it? > > Just inside the class, but **without** the self parameter. Given file > Foo.py: No - this does _not_ work in any version of Python/Jython I've used: Jython 2.1a1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> class X: ... def go( id ): ... print "called:", id ... >>> X.go( "asdf" ) Traceback (innermost last): File "<console>", line 1, in ? TypeError: unbound method go() must be called with instance as first argument >>> The 'self' parameter is not a keyword - it is a convention. Methods on class X require an X instance: >>> X.go( X() ) called: <__main__.X instance at 5991085> >>> What you can do is cheat in one of two ways: class XGo: """Callable object to act as a static method""" def __call__( self, id ): print "called XGo(%s)" % id class XStatics: def go( self, id ): """Use the bound method as a static method""" print "called XStatics.go(%s)" % id # ... and other "static" methods class X: go = XGo() __xstatics = XStatics() go2=__xstatics.go # ... and other static methods X.go( "asdf" ) X.go2( "zxcv") Then executing that from emacs: Jython 2.1a1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. ## working on region in file d:/TEMP/python-289AX1... >>> called XGo(asdf) called XStatics.go(zxcv) >>> kb |
From: Kevin B. <kb...@ca...> - 2001-09-04 17:20:21
|
I imagine this is a result of the Oro Matcher changes: http://cvs.apache.org/viewcvs/~checkout~/jakarta-oro/CHANGES?content-type=text/plain o Perl5StreamInput and methods manipulating Perl5StreamInput have been removed. For the technical reasons behind this decision see "On the Use of Regular Expressions for Searching Text", Clark and Cormack, ACM Transactions on Programming Languages and Systems, Vol 19, No. 3, pp 413-426. kb Humbel Otmar wrote: > > Hello, > > I am still struggling to port our application from JPython 1.0.3 to > Jython 2.x. ... > > So please forgive me for asking: > Where has the Perl5StreamInput gone ? I could not find a hint on the > apache website. > > Or, how could it be replaced, since our application is using the 'old': > import com.oroinc.text.regex.Perl5StreamInput; > > Many thanks, and best wishes. > Oti. > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |