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-08-31 21:14:33
|
Hi, I'm trying out Jython for the first time but the documentation have not covered this scenario: I want to make a class that is callable by Java, that is a child only of java.lang.Object, whose constructor can take 0 or 1 arguments. There seems to be no way to specify two @sig lines. Eg: import java class Foo(java.lang.Object): def __init__(self, arg=None): """@sig public Foo() @sig public Foo(String arg)""" if arg: print arg else: print "No arg passed" However this is unacceptable to Jython. How does one do this? -- John Goerzen <jgo...@co...> GPG: 0x8A1D9A1F www.complete.org |
From: Scott H. <sl...@ho...> - 2001-08-31 16:22:53
|
I am trying to create a jython applet. I am running Windows 2000 pro = with Sun's JDK 1.3.1 and I have tried both Jython 2.0 and 2.1a3. My = code runs fine when I execute it with Jython, but when comiling it into = the applet with (I have only one .py file named dlClient.py): jython --compiler javac --all --jar downloadClient.jar *.py The .jar is created, but it gives a warning about using a deprecated = API. Then when I try to execute it with the appletviewer, I get an = error that says: java.lang.ClassCastException: dlClient Can anyone tell me what I am doing wrong? Below, I have posted the code = for the .py file as well. from java import applet from java.awt import Color,Label,Button,GridLayout,Label from urllib import urlretrieve import time class downloadClient(applet.Applet): def init(self): try: self.setLayout(GridLayout(0,1)) self.title =3D self.add(Label('Download Test', Label.CENTER)) self.title.setBackground(Color.blue) self.title.setForeground(Color.white) self.add(Label('Beginning Download ...')) # this file is 45.7k in size self.startTime =3D time.time() rValue =3D urlretrieve("http://localhost/reports/detail.pdf") rValue =3D urlretrieve("http://localhost/reports/detail.pdf") rValue =3D urlretrieve("http://localhost/reports/detail.pdf") self.endTime =3D time.time() self.elapsedTime =3D int(self.endTime - self.startTime) self.kPerSec =3D int(137.1/self.elapsedTime) self.add(Label('Download Complete')) self.add(Label('Amount Downloaded: 137.1 KB')) self.add(Label('Time Elapsed: ' + str(self.elapsedTime) + ' = seconds')) self.totalSpeed =3D self.add(Label('Total Speed: ' + = str(self.kPerSec) + ' KB/Sec')) self.totalSpeed.setBackground(Color.yellow) #self.totalSpeed.setForeground(Color.blue) except: pass if __name__ =3D=3D '__main__':=20 import pawt pawt.test(downloadClient()) |
From: Humbel O. <Otm...@bi...> - 2001-08-30 16:16:14
|
[Finn Bock] > Revision 2.19 of PyString.java looks like a good candidate: > > """ > StringFormatter.formatFloatDecimal(): Always use the US locale. This > prevents the %f and %g formats from suddenly using commas as fraction > separator in some countries. > """ > > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jython/jython/org/python/core /PyString.java.diff?r1=2.18&r2=2.19 > > regards, > finn Patched, sealed, delivered ... it WORKS - Thanks a lot for the perfect answer ! Oti. |
From: <bc...@wo...> - 2001-08-30 14:53:32
|
[Humbel Otmar] >Because I have to support an 'old' application using JPython 1.0.3, I'd >like to ask if someone knows how the %f formatting behaviour in Jython >was fixed. Revision 2.19 of PyString.java looks like a good candidate: """ StringFormatter.formatFloatDecimal(): Always use the US locale. This prevents the %f and %g formats from suddenly using commas as fraction separator in some countries. """ > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jython/jython/org/python/core/PyString.java.diff?r1=2.18&r2=2.19 regards, finn |
From: Humbel O. <Otm...@bi...> - 2001-08-30 13:53:24
|
Hello, Because I have to support an 'old' application using JPython 1.0.3, I'd like to ask if someone knows how the %f formatting behaviour in Jython was fixed. Consider the following example: [infra|pwe] > jython Jython 2.0 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> print "hello float %f" % "0.01" hello float 0.010000 >>> This result is always the same (IMHO correct), independent of the Windows 2000 Country settings. However, in JPython 1.0.3, after changing the country in the Windows 2000 Country Options, I get (IMHO a wrong result): [infra] > jpython JPython 1.0.3 on java1.3.0 Copyright 1997-1998 Corporation for National Research Initiatives >>> print "hello float %f" % "0.01" hello float 0,010000. >>>=20 I have the old JPython sources and would try to patch this myself, if someone could tell me where to look in the cvs tree (and if it is not too complicated :-). Thanks very much, and best wishes. Oti. |
From: Chris M. <ch...@hd...> - 2001-08-29 20:19:16
|
Thank you very much, that did the trick. Chris On Wed, Aug 29, 2001 at 01:23:56PM -0500, Robert W. Bill wrote: > 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's worthy of a FAQ entry or a patch depending on the > answer to that. > > -rb > > On Wed, 29 Aug 2001, Chris Meyers wrote: > > Is there a problem with the pickle module in jython2.1a3 (or actually any of the 2.1 versions)? This program: > > > > f=open('junkpickle.txt','w') > > j=[] > > for i in range(10): > > j.append(i) > > pickle.dump(j,f) > > > > makes the junkpickle.txt file, but nothing gets dumped to it. The same > > code works fine with jython 2.0, but doesn't work with 2.1a1 or 2.1a3. > > > > Sorry if this is an old problem, but I did a search of the mailing list > > archives and nothing showed up there, so I thought I'd ask. > > > > Thanks, > > Chris > > > > _______________________________________________ > > 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 -- Chris Meyers 7941 Tree Lane Suite 200 Madison WI 53717 |
From: Robert W. B. <rb...@di...> - 2001-08-29 18:25:28
|
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's worthy of a FAQ entry or a patch depending on the answer to that. -rb On Wed, 29 Aug 2001, Chris Meyers wrote: > Is there a problem with the pickle module in jython2.1a3 (or actually any of the 2.1 versions)? This program: > > f=open('junkpickle.txt','w') > j=[] > for i in range(10): > j.append(i) > pickle.dump(j,f) > > makes the junkpickle.txt file, but nothing gets dumped to it. The same > code works fine with jython 2.0, but doesn't work with 2.1a1 or 2.1a3. > > Sorry if this is an old problem, but I did a search of the mailing list > archives and nothing showed up there, so I thought I'd ask. > > Thanks, > Chris > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Chris M. <ch...@hd...> - 2001-08-29 16:39:25
|
Is there a problem with the pickle module in jython2.1a3 (or actually any of the 2.1 versions)? This program: f=open('junkpickle.txt','w') j=[] for i in range(10): j.append(i) pickle.dump(j,f) makes the junkpickle.txt file, but nothing gets dumped to it. The same code works fine with jython 2.0, but doesn't work with 2.1a1 or 2.1a3. Sorry if this is an old problem, but I did a search of the mailing list archives and nothing showed up there, so I thought I'd ask. Thanks, Chris |
From: Carlos Q. <car...@we...> - 2001-08-28 21:16:58
|
Hi all Could you explain me how the jreload module exactly work, I can make LoadSet but I don't know how to import the classes later for instance if I import some of my classes via import jreload r=[ 'rtsums.jar'] ls = jreload.makeLoadSet('ums', r) If I try from ums import * I get no error but I can reference my classes in anyway I imagine. Any suggestions? Regards |
From: dman <ds...@ri...> - 2001-08-27 13:35:16
|
On Mon, Aug 27, 2001 at 02:43:37PM +1000, John Dickson wrote: | Folks | | I'm writing a script to load all the classes in a java application, and have | struck a problem when a subpackage has the same name (but with different | case) as a class. See the archive. Someone else recently described the same problem. -D |
From: Peter B. <ma...@pe...> - 2001-08-27 08:12:56
|
Yeah, JavaScript (despite its crapness) would be the solution if I used frames. I'm prepared to live with the download of a applet for less HTTP page reloads. > Peter Bengtsson wrote: > > > > So, I want to create a little chatwindow JavaApplet that is downloaded once > > to the visitor and then, from there can make constant requests to an > > application server back and forth without having to reload the page. > > > > Can this be done with Jython better than other tools? > > While you can do this with Jython, you'd probably be better off just using Javascript to reload the display frame every time you send new information from the edit frame. This will reduce the load on your network & app server, and instead of requiring the browser to support Java & a large applet, it only needs to support JavaScript. > > kb |
From: John D. <Joh...@qs...> - 2001-08-27 04:40:55
|
Folks I'm writing a script to load all the classes in a java application, and have struck a problem when a subpackage has the same name (but with different case) as a class. For example, in package QSI.Payment we have sub-package cardenquiry, and class CardEnquiry. Then, when I try to import the class, I get the following stack trace: //c/src/server-release-1-2-patches$ jython Jython 2.1a3 on java1.3.1 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import QSI.Payment.cardenquiry.CardNumberEnquiry Traceback (innermost last): File "<console>", line 1, in ? java.lang.NoClassDefFoundError: QSI/Payment/cardenquiry (wrong name: QSI/Payment/CardEnquiry) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:486) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111) at java.net.URLClassLoader.defineClass(URLClassLoader.java:248) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:297) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:120) at org.python.core.SyspathJavaLoader.loadClass(SyspathJavaLoader.java) at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at org.python.core.Py.findClassEx(Py.java) at org.python.core.SysPackageManager.findClass(SysPackageManager.java) at org.python.core.PackageManager.findClass(PackageManager.java) at org.python.core.SysPackageManager.findClass(SysPackageManager.java) at org.python.core.PyJavaPackage.__findattr__(PyJavaPackage.java) at org.python.core.PyObject.impAttr(PyObject.java) at org.python.core.imp.import_next(imp.java) at org.python.core.imp.import_logic(imp.java) at org.python.core.imp.import_name(imp.java) at org.python.core.imp.importName(imp.java) at org.python.core.ImportFunction.load(__builtin__.java) at org.python.core.ImportFunction.__call__(__builtin__.java) at org.python.core.PyObject.__call__(PyObject.java) at org.python.core.__builtin__.__import__(__builtin__.java) at org.python.core.imp.importOne(imp.java) at org.python.pycode._pyx1.f$0(<console>:1) at org.python.pycode._pyx1.call_function(<console>) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyCode.call(PyCode.java) at org.python.core.Py.runCode(Py.java) at org.python.core.Py.exec(Py.java) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java) at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java) at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java ) at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java ) at org.python.util.InteractiveConsole.push(InteractiveConsole.java) at org.python.util.InteractiveConsole.interact(InteractiveConsole.java) at org.python.util.jython.main(jython.java) java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: QSI/Payment/cardenquiry (wrong name: QSI/Payment/CardEnquiry) >>> It appears that jython is trying to import each of the packages first. Can anyone point me in the right direction on this? Am I missing something simple? Cheers ............... JohnD do { nothing() } while ( ! hearFromMe ); John Dickson Architect QSI Payments, Inc Ph: +61-7-3224 9806 Fax: +61-7-3210 2566 Email: mailto:joh...@qs... URL: http://www.qsipayments.com/ _____________________________________________ QSI Payments, Inc Level 22 300 Adelaide Street BRISBANE, QLD, AUSTRALIA 4000 This message or any part of it is intended solely for the named addressee and contains privileged and confidential information. If you receive this message in error please notify QSI Payments, Inc by replying to the sender and removing the message from your computer. |
From: Shae E. <sh...@we...> - 2001-08-26 21:37:26
|
From: jyt...@li... Subject: Jython-users digest, Vol 1 #242 - 6 msgs Date: Sun, 26 Aug 2001 12:03:14 -0700 > >Would jython support having a jar pathname pushed into the > >library path ( eg. sys.path.insert( 0, '/home/foo/application.jar!/lib' ) )? > > This feature have been added to Jython 2.1a3. I would welcome feedback > on its usefullnes in real life applications. > > regards, > finn I use jython for prototyping mostly, and this feature has made things much easier for me. this is much much easier than writing a python script into my .bashrc to add every jar in several directories to my $CLASSPATH this is a really great feature, I use it many times a day. it does confuse reflection stuff in Java though... Class.forName throws errors. ---- Shae Matijs Erisson - http://www.webwitches.com/~shae/ bRing mE fIve sQuirrels aNd nO oNe wIll gEt hUrt 13:00pm up 1 season, 1 squirrel, load average: 1+1j 0.5+2j 0.2+0.5j |
From: Ted B. <te...@et...> - 2001-08-26 21:05:08
|
On Sunday 26 August 2001 04:51, Finn Bock wrote: > [ted] > > >I'm looking at adding jython to a java application i'm writing. To make > > life easier for the end user, I'd like to distribute jython as part of > > the application jar. > > > >My question is this: > >Is it possible or practical to distribute the python modules ( eg. > > string.py ) in the jar? > > In jython-2.0 you will have to write your own __import__ hook. That can > be kind of tricky to do. oh. > >Would jython support having a jar pathname pushed into the > >library path ( eg. sys.path.insert( 0, '/home/foo/application.jar!/lib' ) > > )? > > This feature have been added to Jython 2.1a3. I would welcome feedback > on its usefullnes in real life applications. Killer! Heh my app keeps getting fatter, but at least I can keep the end user download requirements to a minimum. Is there something in a readme about how to use this feature? I only have 2.1a1 installed right now, but i'll be picking up the latest rev when time permits. I'll let you know how it goes as soon as I have tested it. ted |
From: <bc...@wo...> - 2001-08-26 19:02:25
|
[Brian Zhou] >It works! > >But a few observations and questions: > >1. I saw entries like > > JYTHON-PACKAGE-com.ibm.oti.vm > > in the pre-indexed jython.jar, does that mean this jython.jar is >bootstrap classes specific? Yes to some extend. >Can I use the same jython.jar for Sun Personal Java for WinCE/ARM? Yes, but you can't import any of the sun specific non-public classes. Since you shouldn't do that anyway, it is no great loss. >2. I'm thinking about document all this, but will this pre-index feature be >in the next release? I don't know yet. It depends on how usefull it is. Feedback like this makes it easier to decide. >3. The previous pystone boost was not by VAME 1.4 upgrade. Using pre-indexed >jython.jar pystone falls back to 48-49. It was more because I happened to >extract the classes.zip into a directory. This also indicates pre-index in >the jar has some overhead. It should be minimal but the feature does add an addition lookup for a resource with the name JYTHON-PACKAGE-* when an import statement doesn't find any another match. >4. "import re" throws StackOverflownError while "import _sre" works. >Attached is the stack trace. At first look it doesn't seem like a bug but a real stack overflow. Can you extend the amount of stack space allocated? It looks like the javaCC parser isn't optimized for small stacks (but neither if jython). regards, finn |
From: Brian Z. <bri...@ya...> - 2001-08-26 18:26:46
|
It works! But a few observations and questions: 1. I saw entries like JYTHON-PACKAGE-com.ibm.oti.vm in the pre-indexed jython.jar, does that mean this jython.jar is bootstrap classes specific? Can I use the same jython.jar for Sun Personal Java for WinCE/ARM? 2. I'm thinking about document all this, but will this pre-index feature be in the next release? 3. The previous pystone boost was not by VAME 1.4 upgrade. Using pre-indexed jython.jar pystone falls back to 48-49. It was more because I happened to extract the classes.zip into a directory. This also indicates pre-index in the jar has some overhead. 4. "import re" throws StackOverflownError while "import _sre" works. Attached is the stack trace. Thanks for the great work! -Brian ----- Original Message ----- From: "Finn Bock" <bc...@wo...> To: <jyt...@li...> Sent: Friday, August 24, 2001 1:00 PM Subject: Re: [Jython-users] jython on WinCE/iPaq update > [Brian Zhou] > > >Hi all, > > > >About two months ago I experimented with jython on WinCE/iPaq and had some > >success, now VAME (IBM visual age micro edition) has released 1.4 (== 1.3.0 > >jvm), so I tried the new version. > > > >Good news is I don't have to copy Sun's rt.jar, and pystone shows an > >improvement from 48 to 52. But adding \vame1.4\lib\jclMax\classes.zip to the > >classpath option does not work, I have to work around by using a 9M > >extracted .class tree. > > > >Here's the updated instruction: > >... > > Sounds like a good candidate for a faq entry: > > 2.7 How do I install jython on my iPAQ > > > > >Here's the part I hope someone can give me some insight, I want to know why > >classes.zip cannot be in classpath: > > > >1. If I leave the classpath as "-cp:\jython-2.1a1\jython.jar", I can launch > >jython fine, do all the python stuff, while "import java" shows "no module > >named java" > >2. If I use "-cp:\vame1.4\lib\jclMax\classes.zip;\jython-2.1a1\jython.jar", > >I got error message: > >*sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip' > >java.lang.IndexOutOfBoundsException > > > >Stack trace: > > java/lang/Throwable.<init>()V > > java/lang/Throwable.<init>(Ljava/lang/String;)V > > java/lang/IndexOutOfBoundsException.<init>(Ljava/lang/String;)V > > java/util/zip/ZipInputStream.read([BII)I > > java/util/zip/ZipInputStream.skip(J)J > > java/io/DataInputStream.skipBytes(I)I > > org/python/core/PackageManager.checkAccess(Ljava/io/InputStream;)I > > ... > > I find the stacktrace curious. Totally unrelated to the problem you are > having, but when a skip() call can cause a IOOB (perhaps because a > over/underflow of the temporary buffer allocated by skip) then > ZipInputStream are having serious internal problems. Perhaps OTI can be > convinced to take a closer look at the IOOB exception. > > >3. As mentioned, extract classes.zip to directory and add directory to -cp > >works fine. > >4. I also tried to jar classes/ directory into a classes.jar but that caused > >jython to complain "skip bad jar" > > > >Anyone has any idea the cause, or what to do further? > > As the OTI guy said, putting classes.zip on -cp isn't the solution (even > if it didn't throw a IOOB). > > I have made a very experimental feature that allow a tool (running under > java2 on windows or unix) to pre-index a zip/jar file. The pre-index is > then stored inside the zip file. > > If you want to try it out (and I really think you should because it > fixes the problems you are having with this) you will have to apply a > patch to SysPackageManager.java and install a new source file in > org/python/util/jythonjar.java. > > > http://sourceforge.net/tracker/index.php?func=detail&aid=454329&group_id=128 67&atid=312867 > > When you have compiled the changes to jython, you run the indexer tool > like this: > > java org.python.util.jythonjar -usecp -cp classes.zip jython.jar > > After this the jython.jar file is updated with a lot of entries called > > META-INF/JYTHON-PACKAGES-java > META-INF/JYTHON-PACKAGES-java.lang > ... > > These entries will be used when the cache dir doesn't contain entries > for the packages. As a result classes.zip doesn't need to be on the -cp. > > > regards, > finn > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Robert W. B. <rb...@di...> - 2001-08-26 14:55:43
|
On 26 Aug 2001, Kemal G=FCrsoy wrote: > hi all > i am new to jython and i know that tihs question sounds very dull, but = i > have to ask, is there any function for converting python lists to java > arrays? > regards, > kemal In addition to the automatic conversion, there is the jarray module. >>> import jarray >>> myIntArray =3D jarray.array(range(10), 'i') >>> myIntArray array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9], int) jarray docs are at: http://www.jython.org/docs/jarray.html -rb |
From: <bc...@wo...> - 2001-08-26 11:49:39
|
[ted] >I'm looking at adding jython to a java application i'm writing. To make life >easier for the end user, I'd like to distribute jython as part of the >application jar. > >My question is this: >Is it possible or practical to distribute the python modules ( eg. string.py >) in the jar? In jython-2.0 you will have to write your own __import__ hook. That can be kind of tricky to do. >Would jython support having a jar pathname pushed into the >library path ( eg. sys.path.insert( 0, '/home/foo/application.jar!/lib' ) )? This feature have been added to Jython 2.1a3. I would welcome feedback on its usefullnes in real life applications. regards, finn |
From: Ted B. <te...@et...> - 2001-08-26 10:44:52
|
On Sunday 26 August 2001 03:33, Kemal Gürsoy wrote: > hi all > i am new to jython and i know that tihs question sounds very dull, but i > have to ask, is there any function for converting python lists to java > arrays? > regards, > kemal > IIRC, jython lists are automatically converted to java vectors. ted |
From: Kemal <hkg...@ya...> - 2001-08-26 10:32:18
|
hi all i am new to jython and i know that tihs question sounds very dull, but i have to ask, is there any function for converting python lists to java arrays? regards, kemal _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: Ted B. <te...@et...> - 2001-08-25 22:00:31
|
I'm looking at adding jython to a java application i'm writing. To make life easier for the end user, I'd like to distribute jython as part of the application jar. My question is this: Is it possible or practical to distribute the python modules ( eg. string.py ) in the jar? Would jython support having a jar pathname pushed into the library path ( eg. sys.path.insert( 0, '/home/foo/application.jar!/lib' ) )? TIA ted |
From: Robert W. B. <rb...@di...> - 2001-08-25 00:17:20
|
Hellow Mike, On Fri, 24 Aug 2001, Krajnak, Mike (MED) wrote: > Summary: When I split my classes into multiple > files the JythonServlet reports a type error and > can't find the extra classes. > > Details: > I've set up and run the JythonServlet on my Win2K > box and created some sample servlets. I'm using > Jython 2.1a3. > > I have jython in D:\opt\jython and my servlet context > for Tomcat is at D:\dev\jyserv. The jyserv directory > looks like this: > > \jyserv > \WEB-INF > \classes > \lib > jython.jar > \jython > \sample > test1.py > > And test1.py is: > > --- jyserv/sample/test1.py: > import sys > from javax.servlet.http import HttpServlet > > class message: > def __init__(self, pMsg): > self.msg = pMsg > > def getMessage(self): > return self.msg > > class test1(HttpServlet): > def doGet(self, request, response): > response.setContentType("text/html") > out = response.getOutputStream() > > self.mesg = message("Hi Bob!") > out.println(self.mesg.getMessage()) > > out.close() > return > ---eof > > Running jython servlet in Tomcat and going to > http://localhost:8080/jyserv/sample/test1.py > > Displays the "Hi Bob!" message as expected. If I > split the files into two like so: > > --- jyserv\sample\message.py: > class message: > def __init__(self, pMsg): > self.msg = pMsg > > def getMessage(self): > return self.msg > ---eof > > --- jyserv\sample\test1.py: > import sys > from javax.servlet.http import HttpServlet > > class test1(HttpServlet): > def doGet(self, request, response): > response.setContentType("text/html") > out = response.getOutputStream() > > self.mesg = message("Hi Bob!") > out.println(self.mesg.getMessage()) > > out.close() > return > ---eof > > And after restarting Tomcat I get a type error: > > Traceback (innermost last): > File "D:\dev\jythonservlet\worklist\test.py", line 9, in doGet > TypeError: call of non-function (module 'message') > > I've tried various forms of import and from. I've inspected > python path to make sure \dev\jyserv was in the path. I'm fairly > new to Python. Has anyone else had this problem? Why can't I > split up my classes into different files? The import statement that imports "message" is missing from the test1.py example, so I cannot say for sure, but this usually happens when Java habits mix up Jython imports :) in other words, the difference between jython's package/module/class hierarchy as opposed to Java's package/class. If you used "import message" rather than "from message import message", you are calling the module when you do "self.mesg=message("Hi Bob!")". However, Jython doesn't let you call a module- thus the TypeError: call of non-function (module 'message'). Remember, your message class is in the message module, so references must be either: import message self.message = message.message("Hi Bob!") # BTW, Hi! OR from message import message self.message = message("Hi Bob!") cheers, Robert |
From: Krajnak, M. (MED) <mic...@me...> - 2001-08-24 21:26:26
|
Summary: When I split my classes into multiple files the JythonServlet reports a type error and can't find the extra classes. Details: I've set up and run the JythonServlet on my Win2K box and created some sample servlets. I'm using Jython 2.1a3. I have jython in D:\opt\jython and my servlet context for Tomcat is at D:\dev\jyserv. The jyserv directory looks like this: \jyserv \WEB-INF \classes \lib jython.jar \jython \sample test1.py And test1.py is: --- jyserv/sample/test1.py: import sys from javax.servlet.http import HttpServlet class message: def __init__(self, pMsg): self.msg = pMsg def getMessage(self): return self.msg class test1(HttpServlet): def doGet(self, request, response): response.setContentType("text/html") out = response.getOutputStream() self.mesg = message("Hi Bob!") out.println(self.mesg.getMessage()) out.close() return ---eof Running jython servlet in Tomcat and going to http://localhost:8080/jyserv/sample/test1.py Displays the "Hi Bob!" message as expected. If I split the files into two like so: --- jyserv\sample\message.py: class message: def __init__(self, pMsg): self.msg = pMsg def getMessage(self): return self.msg ---eof --- jyserv\sample\test1.py: import sys from javax.servlet.http import HttpServlet class test1(HttpServlet): def doGet(self, request, response): response.setContentType("text/html") out = response.getOutputStream() self.mesg = message("Hi Bob!") out.println(self.mesg.getMessage()) out.close() return ---eof And after restarting Tomcat I get a type error: Traceback (innermost last): File "D:\dev\jythonservlet\worklist\test.py", line 9, in doGet TypeError: call of non-function (module 'message') I've tried various forms of import and from. I've inspected python path to make sure \dev\jyserv was in the path. I'm fairly new to Python. Has anyone else had this problem? Why can't I split up my classes into different files? Thanks!! Mike |
From: Brian Z. <bri...@ya...> - 2001-08-24 21:17:29
|
I'll try it this weekend and report to the group, as always thanks Finn. -Brian ----- Original Message ----- From: "Finn Bock" <bc...@wo...> To: <jyt...@li...> Sent: Friday, August 24, 2001 1:00 PM Subject: Re: [Jython-users] jython on WinCE/iPaq update > [Brian Zhou] > > >Hi all, > > > >About two months ago I experimented with jython on WinCE/iPaq and had some > >success, now VAME (IBM visual age micro edition) has released 1.4 (== 1.3.0 > >jvm), so I tried the new version. > > > >Good news is I don't have to copy Sun's rt.jar, and pystone shows an > >improvement from 48 to 52. But adding \vame1.4\lib\jclMax\classes.zip to the > >classpath option does not work, I have to work around by using a 9M > >extracted .class tree. > > > >Here's the updated instruction: > >... > > Sounds like a good candidate for a faq entry: > > 2.7 How do I install jython on my iPAQ > > > > >Here's the part I hope someone can give me some insight, I want to know why > >classes.zip cannot be in classpath: > > > >1. If I leave the classpath as "-cp:\jython-2.1a1\jython.jar", I can launch > >jython fine, do all the python stuff, while "import java" shows "no module > >named java" > >2. If I use "-cp:\vame1.4\lib\jclMax\classes.zip;\jython-2.1a1\jython.jar", > >I got error message: > >*sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip' > >java.lang.IndexOutOfBoundsException > > > >Stack trace: > > java/lang/Throwable.<init>()V > > java/lang/Throwable.<init>(Ljava/lang/String;)V > > java/lang/IndexOutOfBoundsException.<init>(Ljava/lang/String;)V > > java/util/zip/ZipInputStream.read([BII)I > > java/util/zip/ZipInputStream.skip(J)J > > java/io/DataInputStream.skipBytes(I)I > > org/python/core/PackageManager.checkAccess(Ljava/io/InputStream;)I > > ... > > I find the stacktrace curious. Totally unrelated to the problem you are > having, but when a skip() call can cause a IOOB (perhaps because a > over/underflow of the temporary buffer allocated by skip) then > ZipInputStream are having serious internal problems. Perhaps OTI can be > convinced to take a closer look at the IOOB exception. > > >3. As mentioned, extract classes.zip to directory and add directory to -cp > >works fine. > >4. I also tried to jar classes/ directory into a classes.jar but that caused > >jython to complain "skip bad jar" > > > >Anyone has any idea the cause, or what to do further? > > As the OTI guy said, putting classes.zip on -cp isn't the solution (even > if it didn't throw a IOOB). > > I have made a very experimental feature that allow a tool (running under > java2 on windows or unix) to pre-index a zip/jar file. The pre-index is > then stored inside the zip file. > > If you want to try it out (and I really think you should because it > fixes the problems you are having with this) you will have to apply a > patch to SysPackageManager.java and install a new source file in > org/python/util/jythonjar.java. > > > http://sourceforge.net/tracker/index.php?func=detail&aid=454329&group_id=128 67&atid=312867 > > When you have compiled the changes to jython, you run the indexer tool > like this: > > java org.python.util.jythonjar -usecp -cp classes.zip jython.jar > > After this the jython.jar file is updated with a lot of entries called > > META-INF/JYTHON-PACKAGES-java > META-INF/JYTHON-PACKAGES-java.lang > ... > > These entries will be used when the cache dir doesn't contain entries > for the packages. As a result classes.zip doesn't need to be on the -cp. > > > regards, > finn > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: <bc...@wo...> - 2001-08-24 19:58:29
|
[Brian Zhou] >Hi all, > >About two months ago I experimented with jython on WinCE/iPaq and had some >success, now VAME (IBM visual age micro edition) has released 1.4 (== 1.3.0 >jvm), so I tried the new version. > >Good news is I don't have to copy Sun's rt.jar, and pystone shows an >improvement from 48 to 52. But adding \vame1.4\lib\jclMax\classes.zip to the >classpath option does not work, I have to work around by using a 9M >extracted .class tree. > >Here's the updated instruction: >... Sounds like a good candidate for a faq entry: 2.7 How do I install jython on my iPAQ > >Here's the part I hope someone can give me some insight, I want to know why >classes.zip cannot be in classpath: > >1. If I leave the classpath as "-cp:\jython-2.1a1\jython.jar", I can launch >jython fine, do all the python stuff, while "import java" shows "no module >named java" >2. If I use "-cp:\vame1.4\lib\jclMax\classes.zip;\jython-2.1a1\jython.jar", >I got error message: >*sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip' >java.lang.IndexOutOfBoundsException > >Stack trace: > java/lang/Throwable.<init>()V > java/lang/Throwable.<init>(Ljava/lang/String;)V > java/lang/IndexOutOfBoundsException.<init>(Ljava/lang/String;)V > java/util/zip/ZipInputStream.read([BII)I > java/util/zip/ZipInputStream.skip(J)J > java/io/DataInputStream.skipBytes(I)I > org/python/core/PackageManager.checkAccess(Ljava/io/InputStream;)I > ... I find the stacktrace curious. Totally unrelated to the problem you are having, but when a skip() call can cause a IOOB (perhaps because a over/underflow of the temporary buffer allocated by skip) then ZipInputStream are having serious internal problems. Perhaps OTI can be convinced to take a closer look at the IOOB exception. >3. As mentioned, extract classes.zip to directory and add directory to -cp >works fine. >4. I also tried to jar classes/ directory into a classes.jar but that caused >jython to complain "skip bad jar" > >Anyone has any idea the cause, or what to do further? As the OTI guy said, putting classes.zip on -cp isn't the solution (even if it didn't throw a IOOB). I have made a very experimental feature that allow a tool (running under java2 on windows or unix) to pre-index a zip/jar file. The pre-index is then stored inside the zip file. If you want to try it out (and I really think you should because it fixes the problems you are having with this) you will have to apply a patch to SysPackageManager.java and install a new source file in org/python/util/jythonjar.java. > http://sourceforge.net/tracker/index.php?func=detail&aid=454329&group_id=12867&atid=312867 When you have compiled the changes to jython, you run the indexer tool like this: java org.python.util.jythonjar -usecp -cp classes.zip jython.jar After this the jython.jar file is updated with a lot of entries called META-INF/JYTHON-PACKAGES-java META-INF/JYTHON-PACKAGES-java.lang ... These entries will be used when the cache dir doesn't contain entries for the packages. As a result classes.zip doesn't need to be on the -cp. regards, finn |