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: yoshizak <yos...@da...> - 2001-10-22 18:19:43
|
Hi there, I was looking at the error message and the problem with PyProxy lead me to think I should put the jython.jar into the class path (I believe I saw another e-mail in the user archives that said something about this) don't exactly know why I needed to do this, since I had presumed that this was done by default but when I ran my code sample with java -classpath <some directory tree>/jython-2.0/jython.jar:. tryJythonMain it finally seemed to run. (Yeah! Finally! :) Question is, why did I need to do this? I mean, I'm sure not 'everyone' actually specifies the jar file when running their programs. Do I really need to specify the jar file in the classpath (or CLASSPATH)? In any case, I seem to be able to continue on so thanks for all the help! Appreciate it greatly! Hubert :) |
From: Jeff E. <je...@ad...> - 2001-10-22 17:45:11
|
I drive my app from the jython interpreter command line. Sometimes I'll do something stupid and create an infinite loop (in jython code). Currently, I have to kill the entire process. I'd rather be able to somehow tell the interpreter to break out of the current command that it is processing and return to the command line so I can preserve as much application state as possible. Any suggestions? Jeff Emanuel |
From: Ihab A.B. A. <ih...@ah...> - 2001-10-22 17:18:38
|
Hi all, Thanks Robert Bill & Jim Adrig for the tips.... > Yes, os requires the javaos module, and you get the ImportError when that > module cannot be Located. Fix= make sure module is found. I've been trying, in every manner possible! Here's my code -- rootPath = servletContext.getRealPath("/"); if (!rootPath.endsWith(File.separator)) rootPath += File.separator; Properties p = getInitParametersAsProperties(); p.put( "python.cachedir", servletContext.getAttribute("javax.servlet.context.tempdir").toString()); PythonInterpreter.initialize(System.getProperties(), p, new String[0]); PySystemState pySys = Py.getSystemState(); pySys.add_classdir(rootPath + "WEB-INF" + File.separator + "classes"); pySys.add_extdir(rootPath + "WEB-INF" + File.separator + "lib"); pySys.path.append(new PyString(servletContext.getAttribute("python.home") + File.separator + "Lib")); pySys.path.append(new PyString(rootPath + "WEB-INF" + File.separator + "py")); pythonInterpreter = new PythonInterpreter(null, pySys); I think, based on looking at PyServlet.java, that this should get all my bases covered. However, I still get -- import os dir(os) Traceback (innermost last): File "", line 10, in ? ImportError: no module named javaos import os print os.listdir('/home/ihab') Traceback (innermost last): File "", line 2, in ? AttributeError: class 'org.python.modules.os' has no attribute 'listdir' This is all very confusing. Any help appreciated from anyone. Peace, Ihab -- Ihab A.B. Awad <ih...@ah...> Center for Computational Genomics and Bioinformatics, University of Minnesota. http://www.cbc.umn.edu/~ihab/ |
From: yoshizak <yos...@da...> - 2001-10-22 17:02:43
|
Hi Robert, Haven't been able to reply for awhile because of other business stuff, in anycase the situation changed a little though the result is largely the same (not working yet) >I'm not sure this helps, but the code you list below works fine for me >(linux+sunJDK1.3). One thing that might be worth checking is whether >the tryJythonSample class actually exists in a file called >"tryJythonSample.py". The matching classname/filename is required here, >and a difference in those names makes a NPE like you are seeing. > >If that's no help, check back again :) > >-robert Well, getting back to you here's the situation. I'm now using Linux Mandrake 8.1 with sun's JDK1.3.1 and running jython 2.0 anyhow, I did the following, jythonc tryJythonSample.py (same result with --all option) (all code at end of email) copied the compiled code from the jpywork directory into the current one (cp jpywork/* .) javac -classpath /<directory tree>/jython-2.0:. tryJythonMain.java java tryJythonMain Exception in thread "main" java.lang.NoClassDefFoundError: org/python/core/PyProxy 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 tryJythonMain.main(tryJythonMain.java:10) Any ideas what this is all about? There is obviously something that I'm doing very wrong since something this simple should work no? Thanks in advance, Hubert btw, tried with jythonc --package tryJythonPackage tryJythonSample.py with the corresponding javac code and slight changes to the source code (i.e. import etc.) And I still get the same error message when I run it. As for the reason to go to Linux from win2k, my machine (which was used by someone else before) was not a clean machine. It had (cound them) three jdk's but a bunch of other junk that should not be there so in the interest of killing as many portential problems as possible I switched to Linux (though admitedly, Mandrake may not be the greatest for development). =================================================================== code tryJythonSample.py import java class tryJythonSample(java.lang.Object): def __init__(self): "@sig public tryJythonSample()" print "Constructor for tryJythonSample" def makeObject(self): "@sig public void makeObject()" print "I have just called a python method!!" tryJythonMain.java import org.python.core.*; import tryJythonSample; public class tryJythonMain { public static void main(String[] args) { tryJythonSample jySample = new tryJythonSample(); jySample.makeObject(); } } |
From: Hubert Y. <hyo...@ho...> - 2001-10-22 17:01:15
|
Hi Robert, Haven't been able to reply for awhile because of other business stuff, in anycase the situation changed a little though the result is largely the same (not working yet) >I'm not sure this helps, but the code you list below works fine for me >(linux+sunJDK1.3). One thing that might be worth checking is whether >the tryJythonSample class actually exists in a file called >"tryJythonSample.py". The matching classname/filename is required here, >and a difference in those names makes a NPE like you are seeing. > >If that's no help, check back again :) > >-robert Well, getting back to you here's the situation. I'm now using Linux Mandrake 8.1 with sun's JDK1.3.1 and running jython 2.0 anyhow, I did the following, jythonc tryJythonSample.py (same result with --all option) (all code at end of email) copied the compiled code from the jpywork directory into the current one (cp jpywork/* .) javac -classpath /<directory tree>/jython-2.0:. tryJythonMain.java java tryJythonMain Exception in thread "main" java.lang.NoClassDefFoundError: org/python/core/PyProxy 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 tryJythonMain.main(tryJythonMain.java:10) Any ideas what this is all about? There is obviously something that I'm doing very wrong since something this simple should work no? Thanks in advance, Hubert btw, tried with jythonc --package tryJythonPackage tryJythonSample.py with the corresponding javac code and slight changes to the source code (i.e. import etc.) And I still get the same error message when I run it. As for the reason to go to Linux from win2k, my machine (which was used by someone else before) was not a clean machine. It had (cound them) three jdk's but a bunch of other junk that should not be there so in the interest of killing as many portential problems as possible I switched to Linux (though admitedly, Mandrake may not be the greatest for development). =================================================================== code tryJythonSample.py import java class tryJythonSample(java.lang.Object): def __init__(self): "@sig public tryJythonSample()" print "Constructor for tryJythonSample" def makeObject(self): "@sig public void makeObject()" print "I have just called a python method!!" tryJythonMain.java import org.python.core.*; import tryJythonSample; public class tryJythonMain { public static void main(String[] args) { tryJythonSample jySample = new tryJythonSample(); jySample.makeObject(); } } |
From: Carlos Q. <car...@rt...> - 2001-10-22 07:33:58
|
Hi all (I sent this message yesterday but it didn't appear, if it is posted twice I apologize) I just released a new beta version of JythonInterpreter 0.6 plugin for jEdit, This version has a completely new GUI which follows more closely a "traditional" jython/python interpreter. The new plugin is also almost completely made in jython. some new features: - Completely rewritten GUI featuring a text area where you can write jython commands, it also allows for copy/paste operations - New check version commands which detects if an older version of jython is in the classpath - New copyright/credits/license command - History keys as CTRL+UP and CTRL+DOWN - Error button. When an error is detected a button is appended to the traceback which jumps to the error source - Run current buffer button - Run current buffer and print results to a new buffer - Import current buffer - Path Handler which allows you to easily modify the Jython Path. The path is modified at runtime allowing to load jar files without restarting. The path can be stored and loaded again the next time jython starts - Path Browser, allows you to browse the system path, currently is limited to display only non-compressed files Some limitations: - Path Browser and Error button are not working with compressed files - Some exceptions are not displayed in the Jython window but in the activity log - Documentation has not been updated - Probably many more (it is beta :-)) The plugin can be found here: http://koti.welho.com/cquiroz/jedit/jython/JythonInterpreter.jar The simplest way to install is to first install JythonInterpreter 0.5 using jEdit's PluginManager and replace the JythonInterpreter.jar file with the one from the link. NOTE: This plugin will only work with jython 2.1a3 Regards Carlos Quiroz |
From: Robert W. B. <rb...@di...> - 2001-10-22 04:02:35
|
Hello Ihab, On Sun, 21 Oct 2001, Ihab A.B. Awad wrote: > > Yet more re this ... sorry for the proliferation of msgs. > > (a) I realized that "no module named java" was because my programs were > not specifying a "python.cachedir" property correctly. Fixing this has > fixed the original problem. Good. > (b) Now, running inside my JSP application (which is where I _really_ want > to use Jython), when I do -- > > import os > dir(os) > > I get the error -- > > ImportError: no module named javaos > > Eek. So, now, does _that_ look familiar to anyone? Yes, os requires the javaos module, and you get the ImportError when that module cannot be Located. Fix= make sure module is found. Check your python.home/sys.path vars. Use PythonInterpreter.initialize before instantiating the interpreter to set properties like python.home so modules can be found. The org.python.util.PyServlet code is the best example of setting properties and the initialize method. -robert |
From: Jim A. <Ji...@do...> - 2001-10-22 03:45:12
|
javaos.py is needed for the os module and should be in the Lib directory under your jython.jar. I don't know why it's not being found in your situation, try adding to your classpath? > -----Original Message----- > From: Ihab A.B. Awad [mailto:ih...@ah...] > Sent: Sunday, October 21, 2001 6:32 PM > To: jyt...@li... > Subject: Re: [Jython-users] ImportError: no module named java > > > > Yet more re this ... sorry for the proliferation of msgs. > > (a) I realized that "no module named java" was because my > programs were > not specifying a "python.cachedir" property correctly. > Fixing this has > fixed the original problem. > > (b) Now, running inside my JSP application (which is where I > _really_ want > to use Jython), when I do -- > > import os > dir(os) > > I get the error -- > > ImportError: no module named javaos > > Eek. So, now, does _that_ look familiar to anyone? > > Thanks as always to all and peace, > > Ihab > > -- > Ihab A.B. Awad <ih...@ah...> > Center for Computational Genomics and Bioinformatics, > University of Minnesota. http://www.cbc.umn.edu/~ihab/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Ihab A.B. A. <ih...@ah...> - 2001-10-22 02:32:49
|
Yet more re this ... sorry for the proliferation of msgs. (a) I realized that "no module named java" was because my programs were not specifying a "python.cachedir" property correctly. Fixing this has fixed the original problem. (b) Now, running inside my JSP application (which is where I _really_ want to use Jython), when I do -- import os dir(os) I get the error -- ImportError: no module named javaos Eek. So, now, does _that_ look familiar to anyone? Thanks as always to all and peace, Ihab -- Ihab A.B. Awad <ih...@ah...> Center for Computational Genomics and Bioinformatics, University of Minnesota. http://www.cbc.umn.edu/~ihab/ |
From: Ihab A.B. A. <ih...@ah...> - 2001-10-22 02:10:39
|
Hi again, According to "Ihab A.B. Awad" on Sunday 21 October 2001 20:32: > > interp.exec("import java.lang"); > interp.exec("print java.lang"); > > I get the error -- > > Exception in thread "main" Traceback (innermost last): > File "<string>", line 1, in ? > ImportError: no module named java Based on some surfing, I realized that I need to supply more information. I am running on RedHat Linux RawHide 7.1.94, with the Sun Linux JDK 1.3.1_01. I can't find any way to turn off the JIT with this JVM; passing "-classic" to the JVM does not help. I'm running Java with the command -- java -cp .:/opt/java/jython-2.1a1/jython.jar SimpleEmbedded and, trying to add 'rt.jar' to the command line, as in -- java -cp .: /opt/java/jdk/jdk1.3.1_01-i386-Linux/jre/lib/rt.jar: /opt/java/jython-2.1a1/jython.jar SimpleEmbedded does not help. Peace, Ihab -- Ihab A.B. Awad <ih...@ah...> Center for Computational Genomics and Bioinformatics, University of Minnesota. http://www.cbc.umn.edu/~ihab/ |
From: Ihab A.B. A. <ih...@ah...> - 2001-10-22 01:32:39
|
Hi there, I'm having what must be a pretty simple newbie problem embedding Jython. I'm using Jython 2.1 Alpha 1. I can reproduce my problem by a 2-line change to the included "SimpleEmbeddedjava" example; when I add -- interp.exec("import java.lang"); interp.exec("print java.lang"); I get the error -- Exception in thread "main" Traceback (innermost last): File "<string>", line 1, in ? ImportError: no module named java What am I missing? What do I need to do? I tried to figure it out by reading the code of 'jython.java', since I can definitely "import java.lang" in an interactive console, but I couldn't. Thanks and peace, Ihab -- Ihab A.B. Awad <ih...@ah...> Center for Computational Genomics and Bioinformatics, University of Minnesota. http://www.cbc.umn.edu/~ihab/ |
From: dman <ds...@ri...> - 2001-10-21 22:49:27
|
I want to use jython for a school project. The project is to design and build a mail client and will use Moshe Zadka's PMS framework. I will need to manually install jython into the project's directory structure so that no configuration of the lab machines or the prof's machine is necessary. When I used Jython on windows, there was a Lib directory in the directory I installed jython in. This Lib directory contained many .py files for the standard modules. Now I am using Debian and have installed the debian package (2.1-alpha3-3). The /usr/share/jython/Lib directory has very few .py files, and the startup scripts include the CPython lib directory (/usr/lib/python2.0) in the python.path system property. This seems a little odd to me as it will include many modules that depend on C libraries aas available modules. I checked the jython cvs repository (and the nightly tarball) and found that the Jython Lib directory matches my debian system. For my manual setup, is it correct to simply copy the .py modules that I need from CPython? Have any of the mail modules been tested with Jython? (poplib, imaplib, smtplib, rfc822, the MIME modules) For now I have been copying the CPython modules (symlinking, really) until importing the PMS package succeeded. I am hoping I don't run into any serious compatibility conflicts. TIA, -D |
From: <ki...@ma...> - 2001-10-21 14:07:04
|
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Consolidate all your debt into ONE, EASY monthly payment! We will help you: *Eliminate interest charges *Waive late fee charges *Improve your credit rating And best of all, lower your monthly payments by 40%-60% and KEEP MORE CASH IN YOUR POCKET! Take just 1 minute to complete our Credit Card Consolidation Form and one of our experienced professional consultants will contact you! http://thedebtconsolidation.com There is no obligation and our service is fast and free! All information is kept strictly confidential. **************************************************************** Since you have received this message you have either responded to one of our offers in the past or your address has been registered with us. If you wish to be removed please reply: mailto:mor...@ya...?subject=remove **************************************************************** ********** |
From: Chris G. <cg...@gc...> - 2001-10-20 02:03:21
|
Hi Brian, Thanks for your response. Yes, this is the exact behavior that I'm seeing... Your work-around that you provided in your previous message works great, but I'd also be interested in knowing why it does not produce the expected results. Chris Brian Zhou wrote: > Hi Chris, > > I can reliably reproduce the problem. > > $ lynx -dump http://localhost:8080/ctx/helloA.py > from pkgA import Foo; Foo() => pkgA.Foo() > pkgA.Foo() => pkgA.Foo() > $ lynx -dump http://localhost:8080/ctx/helloB.py > from pkgB import Foo; Foo() => pkgB.Foo() > pkgB.Foo() => pkgB.Foo() > $ lynx -dump http://localhost:8080/ctx/helloA.py > from pkgA import Foo; Foo() => pkgB.Foo() > pkgA.Foo() => pkgA.Foo() > > The third request shows the problem, while pkgA.Foo() and pkgB.Foo() works > fine. > > I guess different servlet URLs share the same PyServlet instance, thus the > same PythonInterpreter instance. JSP does not have this problem because it > does not have separate python name space. > > But even with the workaround, it still puzzles me, as the following is the > expected result. > > Jython 2.1a3 on java1.4.0-beta2 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>>>from pkgA import Foo >>>>Foo() >>>> > pkgA.Foo() > >>>>from pkgB import Foo >>>>Foo() >>>> > pkgB.Foo() > >>>>from pkgA import Foo >>>>Foo() >>>> > pkgA.Foo() > > -Brian > > ----- Original Message ----- > From: "Chris Gokey" <cg...@gc...> > To: <jyt...@li...> > Cc: "Dave Kendig" <dk...@gc...> > Sent: Friday, October 05, 2001 9:02 AM > Subject: [Jython-users] class conflict > > > >>Hi everyone, >> >>I'm seeing some strange behavior when running jython servlets from >>Tomcat 4. Not sure where the source of the error is but I'll try to >>explain. >> >>I have 2 classes and they both have the same name but our in different >>packages, ie., something like this: >> >>pkgA.Foo >>pkgB.Foo >> >>These two classes are different implementation-wise, but they both have >>the same name. >> >>The code I have very explicity refers to pkgA.Foo: >> >>from pkgA import Foo >>f = Foo() >> >>but for some reaon it is using pkgB.Foo. >> >>Now, since this is all loaded under the Tomcat virtual machine, it it >>possible that pkgA.Foo did get loaded into memory, so somehow maybe it >>overwrote the pkgB.Foo when it was loaded by another application? >> >>I noticed this behavior because I was getting all kinds of errors when >>the application was loading and executing the wrong Foo. Then when I >>restarted the Tomcat server everything worked fine. >> >>I'm wondering is it possible to explicitly use a class from a particular >>package like this: >> >>str = java.lang.String() >> >>This can be done in Java, can this be done in python? >> >>Hopefully this makes some sense to someone :) >> >>Chris >> >> >> >>-- >> __________________________________________________ >>/\ >> >> \ >>\_| Christopher D. Gokey, SSAI, NASA/GCMD | >> | 18 Martin Road, Shelburne Falls, MA 01370 | >> | Phone: Voice (413) 625-8129 / FAX 208-248-9055 | >> | cg...@gc... / http://gcmd.nasa.gov | >> | ICQ #52132386, AOL IM: chrisgokey | >> | _____________________________________________|_ >> \_/______________________________________________/ >> >> >>_______________________________________________ >>Jython-users mailing list >>Jyt...@li... >>https://lists.sourceforge.net/lists/listinfo/jython-users >> >> -- __________________________________________________ /\ \ \_| Christopher D. Gokey, SSAI, NASA/GCMD | | 18 Martin Road, Shelburne Falls, MA 01370 | | Phone: Voice (413) 625-8129 / FAX 208-248-9055 | | cg...@gc... / http://gcmd.nasa.gov | | ICQ #52132386, AOL IM: chrisgokey | | _____________________________________________|_ \_/______________________________________________/ |
From: <Mat...@i2...> - 2001-10-19 18:25:08
|
Cool, thanks for the workaround. I guess I'll be the one doing the stressing =) Matt On 10/18/2001 08:21:28 PM jython-users-admin wrote: > > Hi. It was a bug, now it's fixed in the CVS. > Starting with jython 2.0 inheriting from java > classes from 3rd-party classloaders is supported > by design but has not really been stressed ;). |
From: Jim A. <Ji...@do...> - 2001-10-19 17:26:20
|
For various reasons, I just use 'compile' directly: PyCode compiledPage = __builtin__.compile(pythonCode, showThisOnError, "exec"); Although I don't know if there's a way to 'optionally write out the .class' ?... > -----Original Message----- > From: Robert W. Bill [mailto:rb...@di...] > Sent: Thursday, October 18, 2001 7:45 PM > To: Max Muller > Cc: jyt...@li... > Subject: Re: [Jython-users] Creating a .class file from a .py > file from > inside a Java app > > > Hello Max, > > On Thu, 18 Oct 2001, Max Muller wrote: > > Hi, > > I have actually just recently gotten into jython, very cool > > I must say. I am right now in the process of writing a WebObjects > > framework that will allow for the use of Jython WOComponents. When > > it is done I'll release the source and make an annoucement on this > > list. Anyways, right now I have written a JythonClassLoader that > > when given the path to a .py file it will compile the file to a > > .class using jythonc and then read the .class in and construct the > > Class object. So what I am wondering is it possible to not use > > jythonc to compile the .class? I have been looking through > the api in > > the compiler package, but I haven't been able to find that magic > > method. What I would really like to be able to do is in my Java app > > read in the .py file and then using the Java api's of > jython, compile > > the .py file into a byte array (optionally write out the .class at > > this point) then construct the Class object, never having to fire up > > a process outside the regular vm. Anyone have any ideas? Thanks in > > advance. > > An embedded interpreter sounds ideal for your situation, if I've > understood everything correctly. You could execute a .py file in the > embedded interpreter, then retrieve the class defined in that > file as a > Java object with the interpreter's get method. A good > example of this is > the org.python.util.PyServlet class that comes with Jython. > > More embedding info found at http://www.jython.org/docs/embedding.html > > -robert > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Andres Corrada-E. <co...@ci...> - 2001-10-19 15:16:19
|
Hello, Please bear with me. I'm new to Jython and want to use Python code in Java development environment. My attempt is failing because of a "instance already instantiated" error. I've simplified the rand.py code in www.jython.org to this: from java.util import Random class rand(Random): def __init__( self ): "@sig public rand()" # Random.__init__( self ) def nextDouble( self ): return Random.nextDouble( self ) I can use jythonc to turn this into a java class which I then use from a simple java file: import rand; class TestRand { public static void main(String args[]){ rand firstRand = new rand(); System.out.println( firstRand.nextDouble() ); } } As long as I do not call Random.__init__(self) in rand.__init__, the procedure works. But if I uncomment the line it fails with the "instance already instantiated" error. Since the actual Python class that I want to create needs to have something like, JavaSuperClass.__init__(self, foo) this commenting out of the line is not going to work for me. Any ideas on what I am doing wrong? I'm using Jython-2.0. on a SunOs machine. Andres Corrada-Emmanuel Senior Research Fellow Center for Intelligent Information Retrieval University of Massachusetts, Amherst |
From: Robert W. B. <rb...@di...> - 2001-10-19 03:46:15
|
Hello Max, On Thu, 18 Oct 2001, Max Muller wrote: > Hi, > I have actually just recently gotten into jython, very cool > I must say. I am right now in the process of writing a WebObjects > framework that will allow for the use of Jython WOComponents. When > it is done I'll release the source and make an annoucement on this > list. Anyways, right now I have written a JythonClassLoader that > when given the path to a .py file it will compile the file to a > .class using jythonc and then read the .class in and construct the > Class object. So what I am wondering is it possible to not use > jythonc to compile the .class? I have been looking through the api in > the compiler package, but I haven't been able to find that magic > method. What I would really like to be able to do is in my Java app > read in the .py file and then using the Java api's of jython, compile > the .py file into a byte array (optionally write out the .class at > this point) then construct the Class object, never having to fire up > a process outside the regular vm. Anyone have any ideas? Thanks in > advance. An embedded interpreter sounds ideal for your situation, if I've understood everything correctly. You could execute a .py file in the embedded interpreter, then retrieve the class defined in that file as a Java object with the interpreter's get method. A good example of this is the org.python.util.PyServlet class that comes with Jython. More embedding info found at http://www.jython.org/docs/embedding.html -robert |
From: Max M. <max...@ma...> - 2001-10-19 00:57:53
|
Hi, I have actually just recently gotten into jython, very cool I must say. I am right now in the process of writing a WebObjects framework that will allow for the use of Jython WOComponents. When it is done I'll release the source and make an annoucement on this list. Anyways, right now I have written a JythonClassLoader that when given the path to a .py file it will compile the file to a .class using jythonc and then read the .class in and construct the Class object. So what I am wondering is it possible to not use jythonc to compile the .class? I have been looking through the api in the compiler package, but I haven't been able to find that magic method. What I would really like to be able to do is in my Java app read in the .py file and then using the Java api's of jython, compile the .py file into a byte array (optionally write out the .class at this point) then construct the Class object, never having to fire up a process outside the regular vm. Anyone have any ideas? Thanks in advance. Regards, Max ps - One thing that I did think of that just doesn't seem very efficient is to use the Interpreter and read in the main.py of the jythonc and try to catch the output before it goes to disk. But that sounds like it would have more overhead than just running a process outside the current process. |
From: Samuele P. <pe...@in...> - 2001-10-19 00:23:19
|
Hi. It was a bug, now it's fixed in the CVS. Starting with jython 2.0 inheriting from java classes from 3rd-party classloaders is supported by design but has not really been stressed ;). Patch: Index: MakeProxies.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/MakeProxies.java,v retrieving revision 2.16 retrieving revision 2.17 diff -C2 -d -r2.16 -r2.17 *** MakeProxies.java 2001/02/14 22:17:54 2.16 --- MakeProxies.java 2001/10/19 00:16:45 2.17 *************** *** 22,27 **** if (referent != null) { secondary.insertElementAt(referent,0); - referents = secondary; } } else { if (referent != null) { --- 22,27 ---- if (referent != null) { secondary.insertElementAt(referent,0); } + referents = secondary; } else { if (referent != null) { otherwise Workaround: class Foo(java.lang.Object, Java3rdPClassLoaderInterface): pass ^ regards, Samuele Pedroni. ----- Original Message ----- From: <Mat...@i2...> To: <jyt...@li...> Sent: Friday, October 19, 2001 12:01 AM Subject: [Jython-users] classloader funkiness when inheriting from java interfaces > I can use a custom classloader to load a Java class using a classpath > other than that given jython at startup. I can then define a new jython > class deriving from that Java class, and use it without any problems. > However, if I try and do the same thing with a Java exception, I get a > java.lang.NoClassDefFoundError exception. Anyone know why this is, or if > there is a workaround? I've provided an example below, just sub in values > for classpath/classname and you will only see the error when classname is > a java interface. > > from java.io import * > from java.net import * > from jarray import * > > # some.jar not in jython startup classpath > classpath = ["some.jar"] > classname = "some.class.in.some.jar" > > urls = array([File(each).toURL() for each in classpath], URL) > classLoader = URLClassLoader(urls) > javaClass = classLoader.loadClass(classname) > > class Foo(javaClass): > pass > > f = Foo() > > Any help appreciated, thanks, > > Matt > mat...@i2... > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: <Mat...@i2...> - 2001-10-18 23:00:16
|
On 10/18/2001 06:01:09 PM jython-users-admin wrote: > > However, if I try and do the same thing with a Java exception, I get a This should read interface instead of exception Matt |
From: <Mat...@i2...> - 2001-10-18 22:01:17
|
I can use a custom classloader to load a Java class using a classpath other than that given jython at startup. I can then define a new jython class deriving from that Java class, and use it without any problems. However, if I try and do the same thing with a Java exception, I get a java.lang.NoClassDefFoundError exception. Anyone know why this is, or if there is a workaround? I've provided an example below, just sub in values for classpath/classname and you will only see the error when classname is a java interface. from java.io import * from java.net import * from jarray import * # some.jar not in jython startup classpath classpath = ["some.jar"] classname = "some.class.in.some.jar" urls = array([File(each).toURL() for each in classpath], URL) classLoader = URLClassLoader(urls) javaClass = classLoader.loadClass(classname) class Foo(javaClass): pass f = Foo() Any help appreciated, thanks, Matt mat...@i2... |
From: <Eli...@ne...> - 2001-10-18 17:25:20
|
Hello Everyone! I'm looking for people who would like to review a Jython book prior to its being published in order to evaluate its quality. If you're up to it, we might even ask for you to provide a quote that would be included in the book. For your participation I'll send you a couple of our books free of charge, you just have to pick 'em out. If interested, please email me (eli...@ne...) within the next 48 hours and I'll provide you with the details. Looking forward to hearing what you think of our book! :) Elise Walter Acquisitions Editor New Riders Publishing |
From: Andres Corrada-E. <co...@ci...> - 2001-10-18 15:18:31
|
Hello, I'm new to jython. I'm having problems creating a java class from python. I took the example in jython.org that subclasses java.util.Random into a python class: rand. If I then use jythonc to turn "rand" into a rand.class and use it in a java program I get an error with this traceback: at org.python.core.Py.TypeError(Py.java, Compiled Code) at org.python.core.PyReflectedConstructor.__call__(PyReflectedConstructor.java, Compiled Code) at org.python.core.PyReflectedConstructor.__call__(PyReflectedConstructor.java, Compiled Code) at org.python.core.PyReflectedConstructor.__call__(PyReflectedConstructor.java, Compiled Code) at org.python.core.PyObject.__call__(PyObject.java, Compiled Code) at rand$_PyInner.__init__$2(rand.java, Compiled Code) at rand$_PyInner.call_function(rand.java, Compiled Code) at org.python.core.PyTableCode.call(PyTableCode.java, Compiled Code) at org.python.core.PyTableCode.call(PyTableCode.java, Compiled Code) at org.python.core.PyTableCode.call(PyTableCode.java, Compiled Code) at org.python.core.PyFunction.__call__(PyFunction.java, Compiled Code) at org.python.core.PyInstance.__init__(PyInstance.java, Compiled Code) at org.python.core.Py.initProxy(Py.java, Compiled Code) at rand.<init>(rand.java, Compiled Code) at TestRand.main(TestRand.java, Compiled Code) Traceback (innermost last): File "~corrada/qa/test/rand.py", line 0, in __init__ TypeError: instance already instantiated for java.util.Random The rand.py is as shown in www.jython.org/docs/subclassing.html and my TestRand.java class looks like this: import rand; class TestRand { public static void main(String args[]){ rand firstRand = new rand(); System.out.println( firstRand.nextDouble() ); } } What am I doing wrong? Andres Corrada-Emmanuel Senior Research Fellow Center for Intelligent Information Retrieval University of Massachusetts, Amherst |
From: dman <ds...@ri...> - 2001-10-18 14:45:25
|
On Thu, Oct 18, 2001 at 11:58:23AM +0100, Shari Arman wrote: | | This is probably a really soppy question but I'm very very very stuck... | | | I'm trying to run a python script from a java GUI. I have had to use | jnios-1.7 to fix a problem I had with os.py, but now I'm getting: | java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: no | posix in java.library.path | | | I tried to compile jnios-1.7/*.cpp, but it is looking for io.h, does io.h | even exist on UNIX?? | config.h:35: io.h: No such file or directory Yes. Do you have the *-dev packages installed? I use Debian and have the following : --------- $ find /usr/include -name io.h -print /usr/include/sys/io.h /usr/include/asm/io.h $ dpkg -S /usr/include/sys/io.h libc6-dev: /usr/include/sys/io.h --------- If you use debian, 'apt-get install libc6-dev' will fix that problem. | Is there a precompiled unix version of posix.so that I can download?? I don't know of any, and 'apt-cache search' didn't turn up anything that appears relevant. HTH, -D |