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 M. <joh...@ya...> - 2001-05-24 16:42:27
|
Another resource: http://www.fnal.gov/fermitools/abstracts/fermipython/abstract.html Click on Documentation to download an excellent intro to Jython and Swing programming. --- Ben Hutchison <ben...@fi...> wrote: > Sarwar Raza wrote: > > >Would anyone be interested in collaborating on the > >'Jython documentation project' - of course not on the > >scale of the Linux or Python docs, but you get the > >general idea. > > > >thanks > >-Sarwar > > > Yes I would. > > A starting point would be to host it somewhere. Maybe at jython.org > makes most sense, or we could create project in sourceforge without > too > much trouble.Or do you prefer another project host? > > Then, the next question is what to attempt, both style of > documentation > and coverage? > > In terms of content coverage, some ideas: > > Fundamentals: > basic differences between Java and Python > jython types and their mapping to java, python > calling java from jython > calling python from jython > starting jython interpreter from java > calling java methods from jython > handling java exceptions in jython > discuss jython scripts as java classes > subclassing java classes in jython + Java reflection > special jython keywords -> javabeans properties mapping > String handling in jython vs Java > dir() in jython > > Jython software and tools > using interactive interpreter > configuration properties > command line options for tools > layout & description of installed files > using jythonc > using python modules > using java debuggers > jython performance considerations > > Resources > jython web site > Bruce Eckel - thinking in patterns > python web site > > > Thats a start. > > Regards > Ben > > > > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Ben H. <ben...@fi...> - 2001-05-24 16:27:34
|
Sarwar Raza wrote: >Would anyone be interested in collaborating on the >'Jython documentation project' - of course not on the >scale of the Linux or Python docs, but you get the >general idea. > >thanks >-Sarwar > Yes I would. A starting point would be to host it somewhere. Maybe at jython.org makes most sense, or we could create project in sourceforge without too much trouble.Or do you prefer another project host? Then, the next question is what to attempt, both style of documentation and coverage? In terms of content coverage, some ideas: Fundamentals: basic differences between Java and Python jython types and their mapping to java, python calling java from jython calling python from jython starting jython interpreter from java calling java methods from jython handling java exceptions in jython discuss jython scripts as java classes subclassing java classes in jython + Java reflection special jython keywords -> javabeans properties mapping String handling in jython vs Java dir() in jython Jython software and tools using interactive interpreter configuration properties command line options for tools layout & description of installed files using jythonc using python modules using java debuggers jython performance considerations Resources jython web site Bruce Eckel - thinking in patterns python web site Thats a start. Regards Ben > |
From: Sarwar R. <raz...@ya...> - 2001-05-24 12:43:53
|
Would anyone be interested in collaborating on the 'Jython documentation project' - of course not on the scale of the Linux or Python docs, but you get the general idea. thanks -Sarwar ===== ************************* Sarwar S Raza NMS Software Engineer CommWorks Corporation http://www.wpi.edu/~sraza ************************* __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: <Ron...@Ne...> - 2001-05-24 12:15:34
|
There is a book coming out this fall about Java/Python/Web development. Saw it at Amazon; the blurb on it doesn't say much yet. I have the page printed at home, so can't give anymore specifics. Ben Hutchison <ben...@fi...>@lists.sourceforge.net on 05/24/2001 06:09:00 AM Sent by: jyt...@li... To: jyt...@li... cc: Subject: Re: [Jython-users] Jython documentation Joshua Fox wrote: >I have enjoyed reading Eckels' work in Thinking in Patterns about Jython's >capabilities in scripting Java apps. > >We have not found any other documentation about the Java-specific >capabilities of Jython: Calling Java classses from Python, interpreting >Python code in a Java app, compiling Python classes to *.class, etc. > >Is there any such documentation? > AFAIK, only the brief material on www.jython.org, and the archives of this mailing list which holds alot of knowledge. Ive often thought Jython needs a good document set, which could be produced by organizing and distilling the mailing lists & web site. Id like to try it myself but I dont think it will happen while I am working full time. Regards Ben _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: <Arm...@t-...> - 2001-05-24 10:29:54
|
Hi Samuele, thanks for your help. Indeed, the file name has to be '.jython' in the home directory. Regards Armin > Note: the personal file should be named .jython also under windows ! > > I have tried this concretely under w9x (home ~ c:\windows) > and w2k (home ~ see above) and it works. > > Things to check: > * a registry (.jython) file should respect the hosting os conventions: > - Windows: path sep \\ or /, path list sep ; > - Un*x: path sep / , path list sep : > > having a single \ (which is a continues-next-line marker) > around instead of a \\ seems to prevent proper parsing of the file > (symptom: sys.registry seems empty ({})), (we are using the java > api for that) > > * Test: copy registry from jython inst dir to your home dir as .jython and put a > line like > a.Test = yup > in it, load jython and check whether sys.registry contains a.Test=yup. > > Regards. |
From: Ben H. <ben...@fi...> - 2001-05-24 10:07:45
|
Joshua Fox wrote: >I have enjoyed reading Eckels' work in Thinking in Patterns about Jython's >capabilities in scripting Java apps. > >We have not found any other documentation about the Java-specific >capabilities of Jython: Calling Java classses from Python, interpreting >Python code in a Java app, compiling Python classes to *.class, etc. > >Is there any such documentation? > AFAIK, only the brief material on www.jython.org, and the archives of this mailing list which holds alot of knowledge. Ive often thought Jython needs a good document set, which could be produced by organizing and distilling the mailing lists & web site. Id like to try it myself but I dont think it will happen while I am working full time. Regards Ben |
From: Joshua F. <jo...@jo...> - 2001-05-24 06:12:57
|
I have enjoyed reading Eckels' work in Thinking in Patterns about Jython's capabilities in scripting Java apps. We have not found any other documentation about the Java-specific capabilities of Jython: Calling Java classses from Python, interpreting Python code in a Java app, compiling Python classes to *.class, etc. Is there any such documentation? Joshua |
From: Harlan H. <ha...@ot...> - 2001-05-22 21:52:48
|
> Date: Mon, 21 May 2001 18:50:33 -0400 > From: D-Man <ds...@ri...> > > Could you share some of that python code? > > The following code works fine for me: > > ========== Foo.py ============== > import java > > class Foo( java.lang.Object ) : > def __init__( self ) : > """ > @sig public Foo() > """ > print "Foo.__init__" OK, i've figured this one out. I was importing java.math and java.util. for some reason that masks java.lang.Object. When i dropped my "import java.util" in favor of "import java", jythonc was able to let me extend from java.lang.Object. is this a bug in jythonc? > ========== Bar.java =========== > class Bar > { > public static void main( String[] argv ) > { > System.out.println( "main ..." ) ; > Foo obj = new Foo() ; > System.out.println( "end of main" ) ; > } > } I'm using factory methods, and several classes in one .py file, but the code is similar public class session { //is it necessary to load the module, and have it call initConstants? //that's what the following two lines do.. private static pysession._PyInner mod = new pysession._PyInner(); private static PyCode main = mod.getMain(); public static Object createSession() { return new pysession.session(SessionFactory.createSession()); } public static Object createSessionGroup() { return new pysession.sessiongroup(SessionFactory.createSessionGroup()); } } ---- ha...@ot... x293 |
From: Waclawczyk J. <Jan...@ic...> - 2001-05-22 09:02:33
|
Hello, with the option -D I can set only jython system property, but I would like to set system property for my java sw, which is called from jython script. Currently I'm using following workaround: 1. I changed the jython starting script /pool/java/SunOS/jdk1.1.8/bin/jre ... $JAVA_PROPERTIES ... org.python.util.jython "$@" 2. before running jython I set the env variable above tcsh>setenv JAVA_PROPERTIES "-Djan=hello" tcsh>jython Are there more convincing ways? Regards, Janusz Waclawczyk |
From: Samuele P. <pe...@in...> - 2001-05-22 09:01:18
|
Hi. Seems that a lot of people ignore this but java -jar does not use the classpath settings, the jar should be self-contained. This is unrelated to jython <wink> (on the other hand - I think - extensions (in java sense) are considered) http://java.sun.com/j2se/1.3/docs/tooldocs/linux/java.html#-jar regards. |
From: Samuele P. <pe...@in...> - 2001-05-22 08:44:45
|
Hi [Armin Ehrenfels] > Hi Samuele, > > Samuele Pedroni schrieb: > > > Under w2k one can put a personal .jython file (contents as the registry) > > under Documents and Settings/*user-name* (or something like that) > > in NT there should be something similar, just start jython > > and ask: > > > > from java.lang import System > > System.getProperty("user.home") > > > > in that directory you can put your .jython file and deduce the general > > case <wink> > > That was my first guess. So, I copied .jython from Linux to registry in > C:\winnt\profiles\armin which is the value of user.home. Didn't work. It > only works when the registry file is in Jython's installation directory. > > Regards Note: the personal file should be named .jython also under windows ! I have tried this concretely under w9x (home ~ c:\windows) and w2k (home ~ see above) and it works. Things to check: * a registry (.jython) file should respect the hosting os conventions: - Windows: path sep \\ or /, path list sep ; - Un*x: path sep / , path list sep : having a single \ (which is a continues-next-line marker) around instead of a \\ seems to prevent proper parsing of the file (symptom: sys.registry seems empty ({})), (we are using the java api for that) * Test: copy registry from jython inst dir to your home dir as .jython and put a line like a.Test = yup in it, load jython and check whether sys.registry contains a.Test=yup. Regards. |
From: D-Man <ds...@ri...> - 2001-05-21 22:50:43
|
On Mon, May 21, 2001 at 02:56:52PM -0700, Harlan Hile wrote: | > Date: Fri, 18 May 2001 23:21:11 -0400 | > From: D-Man <ds...@ri...> | > You only need the @sig stuff if you want to access the _classes_ in | > the python module from a java class. The limitation to classes only | > (and not module-level stuff) is a result of java. | | So, what i've ended up doing is writing a small bit of java for the module | level stuff.. some constants and a few static methods. i have methods | that return the result of calling the constructors of the classes i have, | which are written in python and then jythonc'd. | This seems to work pretty well, but I had to make the constructors of the | classes accessible from java, which means i needed to make them inherit | from a java class. just having them inherit from Object didnt seem to | work, so they inherit from the classes i'm trying to wrap, which isnt | exactly what should happen, but it works OK. Could you share some of that python code? The following code works fine for me: ========== Foo.py ============== import java class Foo( java.lang.Object ) : def __init__( self ) : """ @sig public Foo() """ print "Foo.__init__" ========== Bar.java =========== class Bar { public static void main( String[] argv ) { System.out.println( "main ..." ) ; Foo obj = new Foo() ; System.out.println( "end of main" ) ; } } ====== shell (bash from cygwin on win2k) ======= $ jythonc Foo.py <jythonc output> $ javac2 -classpath .\;jpywork\;d:/apps/jython-2.0/jython.jar Bar.java $ java2 -classpath .\;jpywork\;d:/apps/jython-2.0/jython.jar Bar main ... Foo.__init__ end of main $ In this message you said that the java code must access the python code. In that case the @sig thing is needed. As you can see in the example, the @sig is rather simple -- it is placed in the method's docstring and contains the java signature that jythonc should generate. -D |
From: Harlan H. <ha...@ot...> - 2001-05-21 21:56:59
|
> Date: Fri, 18 May 2001 23:21:11 -0400 > From: D-Man <ds...@ri...> > You only need the @sig stuff if you want to access the _classes_ in > the python module from a java class. The limitation to classes only > (and not module-level stuff) is a result of java. So, what i've ended up doing is writing a small bit of java for the module level stuff.. some constants and a few static methods. i have methods that return the result of calling the constructors of the classes i have, which are written in python and then jythonc'd. This seems to work pretty well, but I had to make the constructors of the classes accessible from java, which means i needed to make them inherit from a java class. just having them inherit from Object didnt seem to work, so they inherit from the classes i'm trying to wrap, which isnt exactly what should happen, but it works OK. ---- ha...@ot... x293 http://65.0.250.62/ |
From: Frode R. <fro...@er...> - 2001-05-21 21:37:29
|
Hi again, I try with a new example and below you can see the log. I am using Jython2.1a1. If I remove the from ... Import then I get a "AtributeError java package 'datarep.common' has no attribute 'Spacer'". If someone want to try with the datarep_common.jar you can either download Simplicity or send me a mail so I can send it off list. ============ Log start ============ c:\Document\PaaceTest>type test.py type test.py import java,javax,datarep.common from datarep.common import Spacer class testClass: def __init__(self): self.Spacer = datarep.common.Spacer(5,5) t=testClass() print t.Spacer c:\Document\PaaceTest>jython test.py jython test.py datarep.common.Spacer[,0,0,5x5,invalid] c:\Document\PaaceTest>java -jar test.jar -c test.py java -jar test.jar -c test.py Java Traceback: at org.python.core.Py.ImportError(Py.java:180) at org.python.core.imp.importFromAs(imp.java:593) at test$_PyInner.main$3(test.java:61) at test$_PyInner.call_function(test.java:38) at org.python.core.PyTableCode.call(PyTableCode.java:198) at org.python.core.PyCode.call(PyCode.java:13) at org.python.core.imp.createFromCode(imp.java:165) at org.python.core.Py.runMain(Py.java:818) at test.main(test.java:80) Traceback (innermost last): File "C:\Document\PaaceTest\test.py", line 0, in main ImportError: cannot import name Spacer c:\Document\PaaceTest>jythonc -jar test.jar -c test.py jythonc -jar test.jar -c test.py Warning: -jar is deprecated, use --jar processing test Required packages: javax java datarep.common Creating adapters: Creating .java files: test module Compiling .java to .class... Compiling with args: ['c:\\tools\\jdk130\\bin\\javac', '-classpath', '"C:\\tools\\Jython\\Jython21a1\\jython.jar;.;C:\\tools\\SimplicityProfessio nal\\pbclient31RE.jar;C:\\tools\\SimplicityProfessional\\pbnetwork31RE.jar;C :\\tools\\SimplicityProfessional\\datarep_common.jar;.\\jpywork;;C:\\tools\\ Jython\\Jython21a1\\Tools\\jythonc;c:\\Document\\PaaceTest\\.;C:\\tools\\Jyt hon\\Jython21a1\\Lib;C:\\tools\\Jython\\Jython21a1"', '.\\jpywork\\test.java'] 0 Note: Some input files use or override a deprecated API. Note: Recompile with -deprecation for details. Building archive: test.jar Tracking java dependencies: c:\Document\PaaceTest>java -jar test.jar test java -jar test.jar test Java Traceback: at org.python.core.Py.ImportError(Py.java:180) at org.python.core.imp.importFromAs(imp.java:593) at test$_PyInner.main$3(test.java:57) at test$_PyInner.call_function(test.java:36) at org.python.core.PyTableCode.call(PyTableCode.java:198) at org.python.core.PyCode.call(PyCode.java:13) at org.python.core.imp.createFromCode(imp.java:165) at org.python.core.Py.runMain(Py.java:818) at test.main(test.java:74) Traceback (innermost last): File "C:\Document\PaaceTest\test.py", line 0, in main ImportError: cannot import name Spacer c:\Document\PaaceTest>jar -tf c:\tools\SimplicityProfessional\datarep_common.jar jar -tf c:\tools\SimplicityProfessional\datarep_common.jar META-INF/MANIFEST.MF datarep/ datarep/common/ datarep/common/AbsoluteLayout.class datarep/common/ApplicationAudioClip.class datarep/common/BottomLayout.class datarep/common/Calculator.class datarep/common/Calculator$Lexer.class datarep/common/Calculator$Cpu.class datarep/common/CalculatorTest.class datarep/common/CloseListener.class datarep/common/Email.class datarep/common/Flyer.class datarep/common/FlyoutHelpManager.class datarep/common/FrameAnimator.class datarep/common/GBConstraints.class datarep/common/GroupBoxPanel.class datarep/common/HeavyGroupBoxPanel.class datarep/common/Helpable.class datarep/common/HelpTest.class datarep/common/ImageButton.class datarep/common/ImageCanvas.class datarep/common/ImageHandler.class datarep/common/JarUtil.class datarep/common/LeftSideLayout.class datarep/common/MessageBox.class datarep/common/ProgressBar.class datarep/common/Sizer.class datarep/common/Spacer.class datarep/common/TabbedCardPanel.class datarep/common/TemplateProcessor.class datarep/common/TemplateProcessor$Node.class datarep/common/TextPrinter.class datarep/common/Util.class datarep/common/ValidatedTextField.class datarep/common/WrapLabel.class datarep/common/database/ datarep/common/database/QueryTableModel.class datarep/common/database/QueryListModel.class datarep/common/database/QueryComboBoxModel.class datarep/common/database/ColumnMapping.class datarep/common/database/InputMapping.class datarep/common/database/ActionMapping.class datarep/common/database/SelectionMapping.class datarep/common/database/Mapping.class datarep/common/database/Query.class datarep/common/database/QueryList.class datarep/common/database/Command.class datarep/common/database/DatabaseManager.class datarep/common/database/DatabaseManager$SelectionCommandListener.class datarep/common/database/DatabaseManager$ActionCommandListener.class c:\Document\PaaceTest>echo %classpath% echo %classpath% .;C:\tools\SimplicityProfessional\pbclient31RE.jar;C:\tools\SimplicityProfes sional\pbnetwork31RE.jar;C:\tools\SimplicityProfessional\datarep_common.jar c:\Document\PaaceTest> ============ Log end ============ > Hi. > > [Frode Reinsnes] >> I have used Jython for a while, but I haven't use Jythonc before. So I think >> I have miss something, but are not able to se what. : : First example removed because Samuele Pedroni explain it. : >> I am running on Windows 2000 with Sun's JDK 1.3.0. Have I miss some thing? >> >> I wrote this test file because I have develop a application and used the >> interpreter in the debugging phase. Then I want to compile it before I send >> it to external test. But when I compile it with Jythonc and try to run it >> complain about a class in a java library don't exist. > > The std jython interpreter at initialitation time (for jars and dirs) > and at runtime (for dirs) gathers info about java packages and the their > classes (the info about jars is also cached), so a 'dir' correctly reports > all classes in a package. > > The runtime when running jythonc compiled code does not gather such info > (so to be on the safe side for the applet case), on the other hand > the runtime needs to know java packages names to deals with imports properly: > jythonc tries to gather the names of used packages when compiling the program > (through a minimal form of partial evaluation) and store them in the produced > classes but without the complete list of the classes in a package (this is not > really needed and could be slightly different at execution time), so the > empty 'dir' results (only actually imported classes will appear there). > > About the class not found problem: > - a missing 'import' hint > - the program was compiled under a classpath that does not contain > all the classes needed at runtime, so jythonc fails to guess that something > is actually a java package > (yes, roughly jythonc should be executed with a classpath that offers all the > classes that the program will need at runtime) > - a problem with classloaders (these are hard to debug and one > should knows what comes from where) > ... and other possibilities that I don't remember . > > regards, Samuele Pedroni. > |
From: Samuele P. <pe...@in...> - 2001-05-21 20:29:07
|
Hi. [Frode Reinsnes] > I have used Jython for a while, but I haven't use Jythonc before. So I think > I have miss something, but are not able to se what. > > I have this simple python file named test.py: > > import java.lang > print 'java.lang:',dir(java.lang) > > If I compile it with Jythonc I don't get expected result > > c:\Document\Test>jythonc --jar test.jar -c test.py > : > c:\Document\Test>java -jar test.jar test > java -jar test.jar test > java.lang: ['__name__'] > > > But if I use the interpreter I get the expected result. > > c:\Document\Test>jython test.py > jython test.py > java.lang: ['AbstractMethodError', 'ArithmeticException', > 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'Boolean', 'Byte', > 'Character', 'Class', 'ClassCastException', 'ClassCircularityError', > 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', > 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', > 'Double', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', > 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', > 'IllegalMonitorStateException', 'IllegalStateException', > 'IllegalThreadStateException', 'IncompatibleClassChangeError', > 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', > 'InstantiationException', 'Integer', 'InternalError', > 'InterruptedException', 'LinkageError', 'Long', 'Math', > 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError', > 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', > 'NullPointerException', 'Number', 'NumberFormatException', 'Object', > 'OutOfMemoryError', 'Package', 'Process', 'Runnable', 'Runtime', > 'RuntimeException', 'RuntimePermission', 'SecurityException', > 'SecurityManager', 'Short', 'StackOverflowError', 'StrictMath', 'String', > 'StringBuffer', 'StringIndexOutOfBoundsException', 'System', 'Thread', > 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'UnknownError', > 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', > 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', > 'Void', '__name__', 'ref', 'reflect'] > c:\Document\Test> > > I am running on Windows 2000 with Sun's JDK 1.3.0. Have I miss some thing? > > I wrote this test file because I have develop a application and used the > interpreter in the debugging phase. Then I want to compile it before I send > it to external test. But when I compile it with Jythonc and try to run it > complain about a class in a java library don't exist. The std jython interpreter at initialitation time (for jars and dirs) and at runtime (for dirs) gathers info about java packages and the their classes (the info about jars is also cached), so a 'dir' correctly reports all classes in a package. The runtime when running jythonc compiled code does not gather such info (so to be on the safe side for the applet case), on the other hand the runtime needs to know java packages names to deals with imports properly: jythonc tries to gather the names of used packages when compiling the program (through a minimal form of partial evaluation) and store them in the produced classes but without the complete list of the classes in a package (this is not really needed and could be slightly different at execution time), so the empty 'dir' results (only actually imported classes will appear there). About the class not found problem: - a missing 'import' hint - the program was compiled under a classpath that does not contain all the classes needed at runtime, so jythonc fails to guess that something is actually a java package (yes, roughly jythonc should be executed with a classpath that offers all the classes that the program will need at runtime) - a problem with classloaders (these are hard to debug and one should knows what comes from where) ... and other possibilities that I don't remember . regards, Samuele Pedroni. |
From: Samuele P. <pe...@in...> - 2001-05-21 19:40:43
|
Hi. [Robert W. Bill] > Hello, > > I'm curious about the underscore import restriction- e.g, > >>> from A import * > when objects within "A" begin with a single underscore. > > CPython excludes those objects prefixed with a single underscore, > while Jython excludes those with 2 prefixing underscores only. > I didn't see anything on "differences.html," in the bug-list, in > mail archives, nor code comment that indicates this is > intended. Sorry if I've overlooked the obvious, but I > was hoping someone could tell me if this is expected behavior, > or if it could change anytime soon. Thanks for reporting this, it's a bug and there's is another bug related to the fact that the restriction is in-place even when __all__ is set. regards, Samuele Pedroni. |
From: Frode R. <fro...@er...> - 2001-05-21 19:31:00
|
I have used Jython for a while, but I haven't use Jythonc before. So I think I have miss something, but are not able to se what. I have this simple python file named test.py: import java.lang print 'java.lang:',dir(java.lang) If I compile it with Jythonc I don't get expected result c:\Document\Test>jythonc --jar test.jar -c test.py : c:\Document\Test>java -jar test.jar test java -jar test.jar test java.lang: ['__name__'] But if I use the interpreter I get the expected result. c:\Document\Test>jython test.py jython test.py java.lang: ['AbstractMethodError', 'ArithmeticException', 'ArrayIndexOutOfBoundsException', 'ArrayStoreException', 'Boolean', 'Byte', 'Character', 'Class', 'ClassCastException', 'ClassCircularityError', 'ClassFormatError', 'ClassLoader', 'ClassNotFoundException', 'CloneNotSupportedException', 'Cloneable', 'Comparable', 'Compiler', 'Double', 'Error', 'Exception', 'ExceptionInInitializerError', 'Float', 'IllegalAccessError', 'IllegalAccessException', 'IllegalArgumentException', 'IllegalMonitorStateException', 'IllegalStateException', 'IllegalThreadStateException', 'IncompatibleClassChangeError', 'IndexOutOfBoundsException', 'InheritableThreadLocal', 'InstantiationError', 'InstantiationException', 'Integer', 'InternalError', 'InterruptedException', 'LinkageError', 'Long', 'Math', 'NegativeArraySizeException', 'NoClassDefFoundError', 'NoSuchFieldError', 'NoSuchFieldException', 'NoSuchMethodError', 'NoSuchMethodException', 'NullPointerException', 'Number', 'NumberFormatException', 'Object', 'OutOfMemoryError', 'Package', 'Process', 'Runnable', 'Runtime', 'RuntimeException', 'RuntimePermission', 'SecurityException', 'SecurityManager', 'Short', 'StackOverflowError', 'StrictMath', 'String', 'StringBuffer', 'StringIndexOutOfBoundsException', 'System', 'Thread', 'ThreadDeath', 'ThreadGroup', 'ThreadLocal', 'Throwable', 'UnknownError', 'UnsatisfiedLinkError', 'UnsupportedClassVersionError', 'UnsupportedOperationException', 'VerifyError', 'VirtualMachineError', 'Void', '__name__', 'ref', 'reflect'] c:\Document\Test> I am running on Windows 2000 with Sun's JDK 1.3.0. Have I miss some thing? I wrote this test file because I have develop a application and used the interpreter in the debugging phase. Then I want to compile it before I send it to external test. But when I compile it with Jythonc and try to run it complain about a class in a java library don't exist. -- /Frode Reinsnes |
From: Even S. <so...@st...> - 2001-05-21 19:08:46
|
-----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of jyt...@li... Sent: 21. mai 2001 21:07 To: so...@st... Subject: Jython-users -- confirmation of subscription -- request 820700 Jython-users -- confirmation of subscription -- request 820700 We have received a request from 129.241.54.253 for subscription of your email address, <so...@st...>, to the jyt...@li... mailing list. To confirm the request, please send a message to jyt...@li..., and either: - maintain the subject line as is (the reply's additional "Re:" is ok), - or include the following line - and only the following line - in the message body: confirm 820700 (Simply sending a 'reply' to this message should work from most email interfaces, since that usually leaves the subject line in the right form.) If you do not wish to subscribe to this list, please simply disregard this message. Send questions to jyt...@li.... |
From: Jerome B. <jer...@xr...> - 2001-05-21 15:44:55
|
Thanks, I will do as you say. I keep the problem of long('564645646465465L') with Python 1.5.2 and Jython 1.1, so I will upgrade. Jerome D-Man wrote: > > On Mon, May 21, 2001 at 02:09:41PM +0200, Jerome Bouat wrote: > | > I attempt to make the string.atol('564645646465465L') > | > conversion but I obtained this error trace with JPython 2.0 : > | > > | > merveilles{27} jpython1.1 > | > JPython 1.1 on java1.2.2 (JIT: sunwjit) > | > | Sorry, error trace with JPython 1.1 of course. > | > | Does this 'atol' problem has been fixed with JPython 2.0 ? > > Actually, IIRC, string.atol and string.atoi are deprecated. Instead > use the builtin functions "long" and "int", respectively. > > (unfortunately Jython doesn't have doc strings in all of the standard > stuff) > > Python 2.1 (#1, Apr 17 2001, 09:45:01) > [GCC 2.95.3-2 (cygwin special)] on cygwin_nt-4.01 > Type "copyright", "credits" or "license" for more information. > >>> print long.__doc__ > long(x) -> long integer > long(x, base) -> long integer > > Convert a string or number to a long integer, if possible. A floating > point argument will be truncated towards zero (this does not include a > string representation of a floating point number!) When converting a > string, use the given base. It is an error to supply a base when > converting a non-string. > >>> print int.__doc__ > int(x[, base]) -> integer > > Convert a string or number to an integer, if possible. A floating point > argument will be truncated towards zero (this does not include a string > representation of a floating point number!) When converting a string, use > the optional base. It is an error to supply a base when converting a > non-string. > >>> > > Jython 2.0 on java1.3.0 (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> print long.__doc__ > None > >>> print int.__doc__ > None > >>> long( "564645646465465L" ) > 564645646465465L > >>> > > -D > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: D-Man <ds...@ri...> - 2001-05-21 15:42:23
|
On Mon, May 21, 2001 at 05:37:17PM +0200, Jerome Bouat wrote: | Thanks, I will do as you say. | I keep the problem of long('564645646465465L') | with Python 1.5.2 and Jython 1.1, | so I will upgrade. Yes, I think that change was introduced in 2.0. (CPython and Jython) -D |
From: D-Man <ds...@ri...> - 2001-05-21 15:10:15
|
On Mon, May 21, 2001 at 02:09:41PM +0200, Jerome Bouat wrote: | > I attempt to make the string.atol('564645646465465L') | > conversion but I obtained this error trace with JPython 2.0 : | > | > merveilles{27} jpython1.1 | > JPython 1.1 on java1.2.2 (JIT: sunwjit) | | Sorry, error trace with JPython 1.1 of course. | | Does this 'atol' problem has been fixed with JPython 2.0 ? Actually, IIRC, string.atol and string.atoi are deprecated. Instead use the builtin functions "long" and "int", respectively. (unfortunately Jython doesn't have doc strings in all of the standard stuff) Python 2.1 (#1, Apr 17 2001, 09:45:01) [GCC 2.95.3-2 (cygwin special)] on cygwin_nt-4.01 Type "copyright", "credits" or "license" for more information. >>> print long.__doc__ long(x) -> long integer long(x, base) -> long integer Convert a string or number to a long integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the given base. It is an error to supply a base when converting a non-string. >>> print int.__doc__ int(x[, base]) -> integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of a floating point number!) When converting a string, use the optional base. It is an error to supply a base when converting a non-string. >>> Jython 2.0 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> print long.__doc__ None >>> print int.__doc__ None >>> long( "564645646465465L" ) 564645646465465L >>> -D |
From: Samuele P. <pe...@in...> - 2001-05-21 12:44:37
|
> > I attempt to make the string.atol('564645646465465L') > > conversion but I obtained this error trace with JPython 2.0 : > > > > merveilles{27} jpython1.1 > > JPython 1.1 on java1.2.2 (JIT: sunwjit) > > Sorry, error trace with JPython 1.1 of course. > > Does this 'atol' problem has been fixed with JPython 2.0 ? > Yes, it is fixed in Jython 2.0. regards, Samuele Pedroni. |
From: Jerome B. <jer...@xr...> - 2001-05-21 12:17:24
|
> I attempt to make the string.atol('564645646465465L') > conversion but I obtained this error trace with JPython 2.0 : > > merveilles{27} jpython1.1 > JPython 1.1 on java1.2.2 (JIT: sunwjit) Sorry, error trace with JPython 1.1 of course. Does this 'atol' problem has been fixed with JPython 2.0 ? Thanks, Jerome |
From: Samuele P. <pe...@in...> - 2001-05-21 11:16:39
|
Hi. > Hello, > > I attempt to make the string.atol('564645646465465L') > conversion but I obtained this error trace with JPython 2.0 : you mean JPython 1.1 > > merveilles{27} jpython1.1 > JPython 1.1 on java1.2.2 (JIT: sunwjit) > Copyright (C) 1997-1999 Corporation for National Research Initiatives > >>> import string > >>> string.atol('564645646465465L') > Traceback (innermost last): > File "<console>", line 1, in ? > File "/opt/Misc/src/Python-1.5.2/Lib/string.py", line 417, in atol > ValueError: non-integer argument to string.atol > >>> ^D > > > I wonder if this problem > is fixed in the JPython 2.0 > as it seems to be in the Python 2.0 > (is an update usefull) : > of course, you mean Jython 2.0: Jython 2.0 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import string >>> string.atol('564645646465465L') 564645646465465L >>> In any case, an update is useful, it seems you have been lucky until now <wink>, but Jython 2.0 fixes also more "serious" things. regards, Samuele Pedroni. |
From: Samuele P. <pe...@in...> - 2001-05-21 11:06:44
|
Hi. > I wrote some Python code that facilitates dynamic class extension at > runtime for external and internal method invocations. As part of that, it > modifies the __bases__ attribute on classes. Under CPython, this works > fine. Jython, though, explicitly does not allow __bases__ to be modified. > Just for kicks, I modifed the PyClass.java file to go ahead and allow the > modification, and it seems to be happy enough. But I assume there was a > reason for not allowing the assignment, and am wondering if there's some > particularly nasty Jython scenario lurking out there waiting for me to > tickle it? Any insight would be appreciated. > The latest CVS version, also supports this kind of dynamic change. On the other hand it supports it the naive way. The particularly nasty Jython scenario is trying to push the limit playing with java base classes (removing, or substituting ...) regards, Samuele Pedroni. |