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: Carlos Q. <car...@rt...> - 2001-09-20 14:25:04
|
>F5 - Import the current buffer into the interpreter (or reload) >Some variables are always imported into the interpreter environment such as buffer if you >execute in the interpreter execfile(buffer.getPath()) the current buffer will be executed >And Run buffer (with and without step debugging) I haven't tried anything with debugging >I'm thinking that the Jython Interpreter plug-in could add a context menu selection to=20 >any edit buffer that has mode=3Dpython >Will the interpreter get events when buffers are opened, closed and mode changed?=20 I've been thinking about that possibility but since it can be done so simply with a command line I haven't bothered. But if users want it ... ;-) The nice think doing it in the menu is that you can associate a hotkey to it - Thoughts? Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Brad C. <bk...@mu...> - 2001-09-20 14:02:30
|
On 20 Sep 2001 at 9:46, Carlos Quiroz wrote: > Today was released the JythonInterpreter Plugin 0.5 for jEdit > http://www.jedit.org, I whish jython developers can take a look since > jEdit is an excellent editor and now it is jython enabled. > > Aditionally there is a PyUtils plugin which contains a class browser for > python, this plugin should include many more utilities in the near future > and I invite everybody to contribute to it > This is pretty slick. I'm working up a set of articles for Novell on how to use Jython to develop portal gadgets. I had planned on using PythonWin as the editor on Windows in screen shots.. But using Jedit with these plugins would actually be simpler for users. However, I really miss two features from PythonWin. F5 - Import the current buffer into the interpreter (or reload) And Run buffer (with and without step debugging) I'm not so concerned about debugging, but importing the current buffer into the current Jython Interpreter would be very handy. How would I go about adding this functionality? I know nothing about jedit plug-ins.. I'm thinking that the Jython Interpreter plug-in could add a context menu selection to any edit buffer that has mode=python Will the interpreter get events when buffers are opened, closed and mode changed? - Thoughts? Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax netmeeting: ils://ils.murkworks.com AOL-IM: BKClements |
From: Kevin M. <kev...@er...> - 2001-09-20 13:47:29
|
Hi, On Thu, 20 Sep 2001, Humbel Otmar wrote: > > This is just a guess (I'm not an expert). Maybe try, in test2.py: > sys.add_package("com.ericsson.test1") > from com.ericsson.test1 import test1 > instead of: > sys.add_package("com.ericsson.test1") > import com.ericsson.test1 > > The first is my absolute favourite style of importing, and I almost ever > am successful with it. Yes, in general I also use this method. However, in this case it did not have any effect on the problem. test2.py: --------- import sys sys.add_package("com.ericsson.test1") from com.ericsson.test1 import test1 test1.main([""]) Regards, Kevin _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Humbel O. <Otm...@bi...> - 2001-09-20 13:33:32
|
[ Kevin McNamee ] [snip] > test2.py: > --------- > import sys > sys.add_package("com.ericsson.test1") > import com.ericsson.test1 > AttributeError: java package 'com.ericsson.test1' has no=20 > attribute 'test1' > I wonder if calling the add_package procedure is simply allowing the > import statement to succeed without providing any real connection to > another jar file. test1.jar might as well not exist. This is just a guess (I'm not an expert). Maybe try, in test2.py: sys.add_package("com.ericsson.test1") from com.ericsson.test1 import test1 instead of: sys.add_package("com.ericsson.test1") import com.ericsson.test1 The first is my absolute favourite style of importing, and I almost ever am successful with it. Good luck ! Oti. |
From: Kevin M. <kev...@er...> - 2001-09-20 13:15:29
|
On Thu, 20 Sep 2001, Humbel Otmar wrote: > maybe this could be a typo. You had in test2.py: > sys.add_package("com.ericcson.test1") Doh! I am going blind with the permutations. Now I get a _little_ further. test1.py: --------- class gofaster: def __init__(self): print "Zoom" gofaster() Compile: -------- # jythonc -a -p com.ericsson.test1 -j test1.jar test1.py test2.py: --------- import sys sys.add_package("com.ericsson.test1") import com.ericsson.test1 print "dir(com.ericsson.test1):", dir(com.ericsson.test1) com.ericsson.test1.test1.main([""]) Compile: -------- # jythonc -a -p com.ericsson.test2 -j test2.jar test2.py Test: ----- # java -jar test2.jar dir(com.ericsson.test1): ['__name__'] Java Traceback: at org.python.core.Py.AttributeError(Py.java:90) at org.python.core.PyObject.__getattr__(PyObject.java:672) at com.ericsson.test2.test2$_PyInner.main$1(test2.java:47) at com.ericsson.test2.test2$_PyInner.call_function(test2.java:34) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.Py.runMain(Py.java:798) at com.ericsson.test2.test2.main(test2.java:61) Traceback (innermost last): File "/home/qkename/jwork/extdirstest/test2.py", line 0, in main AttributeError: java package 'com.ericsson.test1' has no attribute 'test1' Result: ------- I have stopped adding the Class-Path field to the manifest, since Samuel said that it ignores this and I can confirm it is so. I wonder if calling the add_package procedure is simply allowing the import statement to succeed without providing any real connection to another jar file. test1.jar might as well not exist. Relentlessly, Kevin _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Humbel O. <Otm...@bi...> - 2001-09-20 12:37:47
|
Hello Kevin, maybe this could be a typo. You had in test2.py: sys.add_package("com.ericcson.test1") instead of IMHO: sys.add_package("com.ericsson.test1") if I look at the import=20 from com.ericsson.test1 import test1 greetings Oti. [ Kevin McNamee ] > test2.py: > --------- > import sys > sys.add_package("com.ericcson.test1") > from com.ericsson.test1 import test1 >=20 [snip] > ImportError: No module named ericsson |
From: Kevin M. <kev...@er...> - 2001-09-20 08:00:44
|
Hi, thanks for the input. However, ... test1.py: --------- class gofaster: def __init__(self): print "Zoom" gofaster() Compile: -------- # jythonc -a -p com.ericsson.test1 -j test1.jar test1.py Test: ----- # java -cp test1.jar com.ericsson.test1.test1 Zoom test2.py: --------- import sys sys.add_package("com.ericcson.test1") from com.ericsson.test1 import test1 Compile: -------- # jythonc -a -p com.ericsson.test2 -j test2.jar test2.py MyManifest.txt: -------------- Class-Path: test1.jar Update Jar file: ---------------- # jar -umf MyManifest test2.jar Test: ----- # java -jar test2.jar Java Traceback: at org.python.core.Py.ImportError(Py.java:180) at org.python.core.imp.dottedFind(imp.java:414) at org.python.core.imp.importName(imp.java:436) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at com.ericsson.test1.test1$_PyInner.main$1(test1.java:36) at com.ericsson.test1.test1$_PyInner.call_function(test1.java:28) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.Py.runMain(Py.java:798) at com.ericsson.test1.test1.main(test1.java:54) Traceback (innermost last): File "/home/qkename/jwork/extdirstest/test2.py", line 0, in main ImportError: No module named ericsson Result: ------- The sys.add_package() workaround doesn't work. I wonder how this should work since if as you say, Jython doesn't read the Class-Path field, then it won't be able to find the jar file in the first place. As for the patch. How should this be applied? I did not see any instructions on the webpage about how to do this. Does the workaround above have to be used together with the patch? Much appreciated, Kevin > Hi > > [kevin.mcnamee] > > test2.py: > > --------- > > from com.ericsson.test1 import * > > test1.main([""]) # <--- C style??? > > test1 has no main function defined, OTOH > the top level statements of a module are executed on importing > so no need for that. > > from.com.ericsson.test1 import * > > import * from a java package should not be used in production code, > in particular its support through jythonc is quite fragile, > and does not work with the 1st workaround proposed in the previous > message , I don't rembember for the patch ... > > so a possible test2 is: > > import sys > sys.add_package("com.ericcson.test1") > from com.ericsson.test1 import test1 > # ^ executes the top-level stmts in test1.py > > regards. > > > > > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Carlos Q. <car...@rt...> - 2001-09-20 06:46:18
|
Today was released the JythonInterpreter Plugin 0.5 for jEdit http://www.jedit.org, I whish jython developers can take a look since jEdit is an excellent editor and now it is jython enabled. Aditionally there is a PyUtils plugin which contains a class browser for python, this plugin should include many more utilities in the near future and I invite everybody to contribute to it |
From: Samuele P. <pe...@in...> - 2001-09-19 18:03:15
|
Hi [kevin.mcnamee] > test2.py: > --------- > from com.ericsson.test1 import * > test1.main([""]) # <--- C style??? test1 has no main function defined, OTOH the top level statements of a module are executed on importing so no need for that. from.com.ericsson.test1 import * import * from a java package should not be used in production code, in particular its support through jythonc is quite fragile, and does not work with the 1st workaround proposed in the previous message , I don't rembember for the patch ... so a possible test2 is: import sys sys.add_package("com.ericcson.test1") from com.ericsson.test1 import test1 # ^ executes the top-level stmts in test1.py regards. |
From: Samuele P. <pe...@in...> - 2001-09-19 17:36:44
|
Hi. Mark Robinson wrote [on comp.lang.python]: > I hope it isn't considered inappropriate to post jython questions here! No, but if you're question is jython related (e.g. related to java integration) and not a python general question, you are better served by jyt...@li... > > I am running jython 2.1a1 on winNT4 and getting a very unusual error. In > responce to a getFocus event I attempt to determine which object > obtained the focus (in this case a JTextField object) as follows: > > e.getComponent().getClass().getName() > > At run time I am getting a TypeError exception saying that getName() > expects 1 arg and is receiving 0. From the Java documentation it would > seem that getName() doesn't ever take an argument. > Can anyone tell me if this is implemented differently in jython or if I > am just making a daft mistake, or where I might be able to find out what > argument it is expecting (my searching has been fruitless). > That's tricky. Let's see >>> from java.io import File >>> from java.lang import Object >>> Object.getName() 'java.lang.Object' >>> File.getName() Traceback (innermost last): File "<console>", line 1, in ? TypeError: getName(): expected 1 args; got 0 >>> # ??? That's the very same problem. Why does this happen? The contents of File.__dict__ masks the contents File.__class__ .__dict__ , File.__class__ is java.lang.Class but File has a getName method too, so File.getName give you an unbound version of that method, that expects a File argument (the this/self argument): >>> f=File('/usr') >>> File.getName(f) 'usr' In general when you want to call a method of java.lang.Class on a Class instance and avoid this kind of clash, you should use the unbound version: >>> from java.lang import Class >>> Class.getName(File) 'java.io.File' Or using the pythonic classes protocol, which has an equivalent support at least for getName: >>> File.__name__ 'java.io.File' You encounter the problem because java.awt.Component has a getName method. regards, Samuele Pedroni. |
From: Samuele P. <pe...@in...> - 2001-09-19 15:38:09
|
Now, the sad part about jython; jython ignores the Class-Path in the manifest. You can either use: import sys sys.add_package("your.java.package") or try out the experimental patch at: http://sourceforge.net/tracker/index.php?func=detail&aid=454329&group_id=12867& atid=312867 in order to index your jars. For reference see the thread http://aspn.activestate.com/ASPN/Mail/Message/Jython-dev/754080 and http://aspn.activestate.com/ASPN/Mail/Message/Jython-dev/754170 Please, ignore the part about RunJar, it will not be supported in that form. regards. |
From: Kevin M. <kev...@er...> - 2001-09-19 12:52:45
|
Hi again, I have tried for several hours now to use the extension dirs, but they don't seem to work. A small example where test2.jar tries to import a test1.jar class: test1.py: --------- class gofaster(): def __init__(self): print "Zoom" faster() Compile: -------- # jythonc -a -p com.ericsson.test1 -j test1.jar test1.py Test: ----- # java -cp test1.jar com.ericsson.test1.test1 Zoom test2.py: --------- from com.ericsson.test1 import * test1.main([""]) # <--- C style??? Compile: -------- # jythonc -a -p com.ericsson.test2 -j test2.jar test2.py MyManifest.txt: -------------- Class-Path: test1.jar Update Jar file: ---------------- # jar -umf MyManifest test2.jar Test: ----- # java -jar test2.jar Java Traceback: at org.python.core.Py.ImportError(Py.java:180) at org.python.core.imp.dottedFind(imp.java:414) at org.python.core.imp.importName(imp.java:436) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at com.ericsson.test1.test1$_PyInner.main$1(test1.java:36) at com.ericsson.test1.test1$_PyInner.call_function(test1.java:28) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.Py.runMain(Py.java:798) at com.ericsson.test1.test1.main(test1.java:51) Traceback (innermost last): File "/home/qkename/jwork/extdirstest/test1.py", line 0, in main ImportError: No module named ericsson Environment: ------------ Everything is done in one directory. CLASSPATH is not set to anything. Using Jython 2.0 on java1.3.1 (JIT: null). Much appreciated, Kevin. On Tue, 18 Sep 2001, Samuele Pedroni wrote: > > > > > > That's a java problem/design decision. > > > > > > Java -jar ignores the classpath and limits loading > > > to the jar and the extension dirs. > > > > > > http://java.sun.com/j2se/1.3/docs/tooldocs/linux/java.html#options > > > > This webpage confirms that I can use '-cp' to set the classpath when > > running my app. > You have missed the point. It is not a matter of what the page says > about -cp but what it says about -jar: (from the vary seem page) > > > -jar > Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file > instead of a startup class name. In order for this option to work, the manifest of the JAR file > must contain a line of the form Main-Class: classname. Here, classname identifies the class > having the public static void main(String[] args) method that serves as your application's > starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for > information about working with Jar files and Jar-file manifests. > > When you use this option, the JAR file is the source of all user classes, and other user class > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > path settings are ignored. > ^^^^^^^^^^^^^^^^^^^^^^^^^ > > Now you can reread my previous message. > > > > > This feels like something silly I've missed. Until now I have been trying > > to avoid having to learn about the Java environment, but there seems to be > > no helping it. > > > Avoiding to learn about the Java env and using jython is a bad > idea... > > regards, Samuele Pedroni. > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Ype K. <yk...@xs...> - 2001-09-18 18:09:35
|
Dave, >Dear All, >just rejoined the jython/python community after a long break. >I am a bout to embark on a project that requires unit testing and Java3D. >Jython seems to be the obvious choice. To get me back in the swing of things >does anyone have some simple demos of calling JUnit from Jython ? >Ditto Java3D ? I have searched the archives but came up a blank, perhaps >I am not searching the correct place ? > David You might want to try PyUnit instead of JUnit, it works fine from Jython. http://pyunit.sourceforge.net It is based on the same design, demo's are included. My guess is that it will be in the next release of jython. As for Java3D: I have never used it... Have fun, Ype |
From: Samuele P. <pe...@in...> - 2001-09-18 17:39:42
|
> > > That's a java problem/design decision. > > > > Java -jar ignores the classpath and limits loading > > to the jar and the extension dirs. > > > > http://java.sun.com/j2se/1.3/docs/tooldocs/linux/java.html#options > > This webpage confirms that I can use '-cp' to set the classpath when > running my app. You have missed the point. It is not a matter of what the page says about -cp but what it says about -jar: (from the vary seem page) -jar Execute a program encapsulated in a JAR file. The first argument is the name of a JAR file instead of a startup class name. In order for this option to work, the manifest of the JAR file must contain a line of the form Main-Class: classname. Here, classname identifies the class having the public static void main(String[] args) method that serves as your application's starting point. See the Jar tool reference page and the Jar trail of the Java Tutorial for information about working with Jar files and Jar-file manifests. When you use this option, the JAR file is the source of all user classes, and other user class ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ path settings are ignored. ^^^^^^^^^^^^^^^^^^^^^^^^^ Now you can reread my previous message. > > This feels like something silly I've missed. Until now I have been trying > to avoid having to learn about the Java environment, but there seems to be > no helping it. > Avoiding to learn about the Java env and using jython is a bad idea... regards, Samuele Pedroni. |
From: Kevin M. <kev...@er...> - 2001-09-18 16:57:23
|
Hi, > That's a java problem/design decision. > > Java -jar ignores the classpath and limits loading > to the jar and the extension dirs. > > http://java.sun.com/j2se/1.3/docs/tooldocs/linux/java.html#options This webpage confirms that I can use '-cp' to set the classpath when running my app. # java -cp /opt/ericsson/nms_cif_pas/lib/nms_cif_pas.jar -jar myapp.jar But this doesn't work. Should I be setting the classpath compiler option in my .jython file also? This feels like something silly I've missed. Until now I have been trying to avoid having to learn about the Java environment, but there seems to be no helping it. Regards, Kevin. > > On the other hand you can use as a surrugate > the Class-Path attribute in the manifest file: > > http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Main Attributes > > regards, Samuele Pedroni. > > > From: Kevin McNamee <kev...@er...> > > X-X-Sender: <qk...@lm...> > > To: Jyt...@li... > > MIME-version: 1.0 > > Subject: [Jython-users] CLASSPATH problem > > X-BeenThere: jyt...@li... > > X-Mailman-Version: 2.0.5 > > List-Help: <mailto:jyt...@li...?subject=help> > > List-Post: <mailto:jyt...@li...> > > List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/jython-users>, > <mailto:jyt...@li...?subject=subscribe> > > List-Id: <jython-users.lists.sourceforge.net> > > List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/jython-users>, > <mailto:jyt...@li...?subject=unsubscribe> > > List-Archive: <https://lists.sourceforge.net/archives//jython-users/> > > X-Original-Date: Tue, 18 Sep 2001 11:30:37 +0200 (MEST) > > Date: Tue, 18 Sep 2001 11:30:37 +0200 (MEST) > > X-Keywords: > > > > Hi, > > > > probably not a novel question, but how do I get my compiled script to look > > in CLASSPATH. > > > > I do the following: > > > > # jythonc -a -j gui.jar Gui.py > > > > Then I try > > > > # setenv CLASSPATH /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar > > # java -jar gui.jar > > > > or > > > > # java -cp /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar -jar gui.jar > > > > but neither work. > > It works fine when I use the interpreter: > > > > # setenv CLASSPATH /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar > > # jython Gui.py > > > > What I am doing wrong? > > > > > > Any help appreciated, > > Kevin > > > > _________________________________________________ > > Name/Title : Kevin McNamee, Software Consultant > > Phone : +46 13 32 1165 > > > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > https://lists.sourceforge.net/lists/listinfo/jython-users > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Samuele P. <pe...@in...> - 2001-09-18 15:53:59
|
Hi. That's a java problem/design decision. Java -jar ignores the classpath and limits loading to the jar and the extension dirs. http://java.sun.com/j2se/1.3/docs/tooldocs/linux/java.html#options On the other hand you can use as a surrugate the Class-Path attribute in the manifest file: http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Main Attributes regards, Samuele Pedroni. > From: Kevin McNamee <kev...@er...> > X-X-Sender: <qk...@lm...> > To: Jyt...@li... > MIME-version: 1.0 > Subject: [Jython-users] CLASSPATH problem > X-BeenThere: jyt...@li... > X-Mailman-Version: 2.0.5 > List-Help: <mailto:jyt...@li...?subject=help> > List-Post: <mailto:jyt...@li...> > List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/jython-users>, <mailto:jyt...@li...?subject=subscribe> > List-Id: <jython-users.lists.sourceforge.net> > List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/jython-users>, <mailto:jyt...@li...?subject=unsubscribe> > List-Archive: <https://lists.sourceforge.net/archives//jython-users/> > X-Original-Date: Tue, 18 Sep 2001 11:30:37 +0200 (MEST) > Date: Tue, 18 Sep 2001 11:30:37 +0200 (MEST) > X-Keywords: > > Hi, > > probably not a novel question, but how do I get my compiled script to look > in CLASSPATH. > > I do the following: > > # jythonc -a -j gui.jar Gui.py > > Then I try > > # setenv CLASSPATH /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar > # java -jar gui.jar > > or > > # java -cp /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar -jar gui.jar > > but neither work. > It works fine when I use the interpreter: > > # setenv CLASSPATH /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar > # jython Gui.py > > What I am doing wrong? > > > Any help appreciated, > Kevin > > _________________________________________________ > Name/Title : Kevin McNamee, Software Consultant > Phone : +46 13 32 1165 > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Samuele P. <pe...@in...> - 2001-09-18 15:47:39
|
[Phil Surette] > <AntonioSaid> > One question to those of you who know the source. In what class does the > bulk of the loading take place? I want to be able to load both *.class files > and *py files and I don't think it should be too bad of a change. > </AntonioSaid> > > I believe I answered this directly in my first reply to your question. Apply > this patch: The patch does not load .class files. > > org/jython/core/imp.java in jython-2.1a3: > imp.java > 498a499,502 > > //if it's not a builtin or in the python path, try the classpath > > ret = loadFromClassLoader(name, imp.class.getClassLoader()); > > if (ret != null) return ret; > > This patch has been posted on jython-dev, nobody for the moment could comment and dedicate time on this regards, Samuele Pedroni PS: be patient ;) |
From: Phil S. <psu...@es...> - 2001-09-18 14:49:46
|
<AntonioSaid> One question to those of you who know the source. In what class does the bulk of the loading take place? I want to be able to load both *.class files and *py files and I don't think it should be too bad of a change. </AntonioSaid> I believe I answered this directly in my first reply to your question. Apply this patch: org/jython/core/imp.java in jython-2.1a3: imp.java 498a499,502 > //if it's not a builtin or in the python path, try the classpath > ret = loadFromClassLoader(name, imp.class.getClassLoader()); > if (ret != null) return ret; > Note that I don't know the source code, just poked around for a couple of hours and this seems to work. |
From: Kevin M. <kev...@er...> - 2001-09-18 13:01:18
|
Hi, nothing serious but.. My home directory is mounted on two machines. The same Jython is installed on both of them. When I alternate between telnet sessions, jython always starts with *sys-package-mgr*: processing modified jar, '/opt/python/jpython/jython.jar' The jar files have the same size, checksum and location. Why is jython so paranoid? Regards, Kevin _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Kevin M. <kev...@er...> - 2001-09-18 09:30:44
|
Hi, probably not a novel question, but how do I get my compiled script to look in CLASSPATH. I do the following: # jythonc -a -j gui.jar Gui.py Then I try # setenv CLASSPATH /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar # java -jar gui.jar or # java -cp /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar -jar gui.jar but neither work. It works fine when I use the interpreter: # setenv CLASSPATH /opt/ericsson/nms_cif_ist/lib/nms_cif_ist.jar # jython Gui.py What I am doing wrong? Any help appreciated, Kevin _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Dave D. <d.j...@hu...> - 2001-09-18 07:29:21
|
Dear All, just rejoined the jython/python community after a long break. I am a bout to embark on a project that requires unit testing and Java3D. Jython seems to be the obvious choice. To get me back in the swing of things does anyone have some simple demos of calling JUnit from Jython ? Ditto Java3D ? I have searched the archives but came up a blank, perhaps I am not searching the correct place ? David ________________________________________________________________________________ ******************************************************** * David Dench * * School of Computing & Mathematics * * The University of Huddersfield * * Tel: 01484 472083 * * email: d.j...@hu... * * web: http://scom.hud.ac.uk/staff/scomdjd * ******************************************************** ________________________________________________________________________________ |
From: dman <ds...@ri...> - 2001-09-18 02:27:36
|
On Sun, Sep 16, 2001 at 10:40:10PM -0400, Antonio Rodriguez wrote: | Let me clarify: | | Im not asking how to put classes in the classpath. I'm asking how to | put all of the standard python library (the .py modules like re.py | and httplib.py) that compile to *$py.class into a jar in such a way | that when a PythonInterpreter runs over the line: import re, it can | import the python library from a jar. Oh, now I see. You can use jythonc to compile a python program and all its dependencies into a single jar file (which is suitable for distribution as a java applet). Note, however, that the result from jythonc isn't .py files in a jar file but rather .class files in a jar file. HTH, -D |
From: Samuele P. <pe...@in...> - 2001-09-17 23:06:34
|
[Humbel Otmar] > > Please let me try to describe the problem we have with our jar file. > First at all, I think it is not a Jython issue. If > java.util.Locale.getAvailableLocales() is called with this jar file in > the classpath, we get: > 'file IO Exception:java.util.zip.ZipException: invalid EXT > descriptor signature' > [snip] > > I tend to blame PKZIP for that (but its only a guess), because if we do Thanks for the report. No, the real problem is that sun didn't get the zip specification right or there are two "interpeprations" of it and took care of just one. To be honest the java.util.zip classes are a bit fragile, and with java 1.1 also have many bugs. But I don't think we will write our own versions ;( The moral: better use sun jar tool to create a jar to be used with java and jython. I don't remember the details but e.g. zipfile.py also seems to produce on some cases zips that java does not like. regards. |
From: Samuele P. <pe...@in...> - 2001-09-17 22:59:01
|
Hi. > Thanks to all who answered my original question. I wanted to put a caveat in the archive for future reference. > > This scheme works well but appears a bit finicky. Namely, if you pre-compile the standard python library into .class files (to save time later), they will not load from a jar. Do you mean *$py.class files produced by the interp? you should be able to put them inside the jar and that should work, otherwise is a bug :) If you mean precompiled by jythonc ... that's another thing. > One question to those of you who know the source. In what class does the bulk of the loading take place? I want to be able to load both *.class files and *py files and I don't think it should be too bad of a change. > See above. In any case importing is implemented in org.python.core.imp and the various *PackageManager classes ... regards, Samuele Pedroni. |
From: Antonio R. <An...@ho...> - 2001-09-17 22:05:23
|
Thanks to all who answered my original question. I wanted to put a caveat in the archive for future reference. This scheme works well but appears a bit finicky. Namely, if you pre-compile the standard python library into .class files (to save time later), they will not load from a jar. Also, the jar should have the structure Lib/***.py as opposed to just **.py at the top level or it won't work. One question to those of you who know the source. In what class does the bulk of the loading take place? I want to be able to load both *.class files and *py files and I don't think it should be too bad of a change. Does anyone have a reason as to why this would be a _bad_ idea. I figure it can only make things faster... Antonio -|Phil Surette <psu...@es...> wrote on Mon Sep 17 09:46:35 EDT 2001: Great tip Carlos! So, if you change to your jython home directory and create a lib.jar like this: >jar -cvf lib.jar Lib Then you can invoke jython like this: >java -cp jython.jar -Dpython.path=lib.jar!Lib org.python.util.jython and all your imports will work... To verify that the .py files are really coming from lib.jar and not from the $JYTHON_HOME/Lib directory, you might want to rename the Lib directory temporarily. Jython seems to be able to search for the Lib directory based on the location of jython.jar, though how it does this I do not know. -----Original Message----- From: Carlos Quiroz [mailto:car...@we...] Sent: Monday, September 17, 2001 3:55 AM To: jyt...@li... Subject: Re: [Jython-users] import from jar--clarification On Monday 17 September 2001 05:40, Antonio Rodriguez wrote: To do this you can bundle your py file into a subdir for the module, let say subdir util and filt util1, then it will be in the jar util.jar. You can add the jar to the sys.path by doing import sys sys.path.append("/path/to/jar/util.jar!util"); after this is possible to do from util import util1 You can also do this in java via PySystemState sys = Py.getSystemState(); sys.path.append(new PyString("/path/to/jar/util.jar!util")); Notice that this works only in jython 2.1a3 Therefore you can bundle all standard libraries in a lib.jar and do sys.path.append("/path/to/jar/lib.jar!Lib") Regards > Let me clarify: > > Im not asking how to put classes in the classpath. I'm asking how to put > all of the standard python library (the .py modules like re.py and > httplib.py) that compile to *$py.class into a jar in such a way that when a > PythonInterpreter runs over the line: import re, it can import the python > library from a jar. > > > Thanks. > > > -|dman <ds...@ri...> wrote on Sun Sep 16 20:56:03 EDT 2001: > > On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: > | How do I put a jar in the path of a PythonInterpreter object? > > $ java -help > Usage: java [-options] class [args...] > (to execute a class) > or java -jar [-options] jarfile [args...] > (to execute a jar file) > > where options include: > -client to select the "client" VM > -server to select the "server" VM > -classic to select the "classic" VM > If present, the option to select the VM must be first. > The default VM is -client. > > -cp -classpath <directories and zip/jar files separated by :> > set search path for application classes and resources > -D<name>=<value> > set a system property > -verbose[:class|gc|jni] > enable verbose output > -version print product version and exit > -showversion print product version and continue > -? -help print this help message > -X print help on non-standard options > > $ > > > The use -classpath option to the JVM you run jython with. > > HTH, > -D > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |