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: Mr <mro...@us...> - 2001-08-08 17:48:44
|
How can I use xml.parsers.expat on a Mac? I tried import xml.parsers.expat How can I get expat for the Mac?=20 I don't have code warrior c compiler. Mr |
From: Sells, F. <fr...@ad...> - 2001-08-07 15:58:27
|
I'm having similar problem with importing my own package. see thread on jythonc debug help no solution yet. -----Original Message----- From: Peter Brinkmann [mailto:bri...@ma...] Sent: Tuesday, August 07, 2001 1:46 AM To: jyt...@li... Subject: [Jython-users] Trouble with 'os' package Hi! I've got some jython code that works fine when run with jython but breaks down when compiled and run with java. Here's the message I'm seeing. > Java Traceback: > > at org.python.core.Py.JavaError(Py.java, Compiled Code) > at org.python.core.PyTableCode.call(PyTableCode.java, Compiled Code) > at org.python.core.imp.createFromCode(imp.java, Compiled Code) > at org.python.core.imp.createFromClass(imp.java, Compiled Code) > at org.python.core.imp.loadPrecompiled(imp.java, Compiled Code) > at org.python.core.imp.loadFromPath(imp.java, Compiled Code) > at org.python.core.imp.loadFromPath(imp.java, Compiled Code) > at org.python.core.imp.load(imp.java, Compiled Code) > at org.python.core.imp.load(imp.java, Compiled Code) > at org.python.core.imp.importName(imp.java, Compiled Code) > at org.python.core.imp.importName(imp.java, Compiled Code) > at org.python.core.ImportFunction.load(__builtin__.java, Compiled Code) > at org.python.core.ImportFunction.__call__(__builtin__.java, Compiled Code) > at org.python.core.PyObject.__call__(PyObject.java, Compiled Code) > at org.python.core.__builtin__.__import__(__builtin__.java, Compiled Code) > at org.python.core.imp.importFromAs(imp.java, Compiled Code) > at pbj.jpy.pbjgraph$_PyInner.main$35(pbjgraph.java, Compiled Code) > [...] > Traceback (innermost last): > File "/home/brinkman/prog/java/train/pbjp/pbjgraph.py", line 0, in main > File "/home/brinkman/prog/java/gumbie/MenuMaker.py", line 0, in main > java.lang.ExceptionInInitializerError: java.lang.NullPointerException > I've narrowed it down to trouble with the 'os' package. It appears that I can import it without trouble, but any attempt to use it (e.g., use 'os.curdir' or 'os.path.join') causes an exception like the one above. Any ideas? Thanks, Peter _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Silvio A. <sar...@mo...> - 2001-08-07 14:09:09
|
Ok, I just realized that Python language supports multi thread programs:) I was so concentrated on extensions and Python API that I didn't even think looking in the *library* manual. sorry for having bothered you!:) Silvio. |
From: Silvio A. <sar...@mo...> - 2001-08-07 09:11:45
|
Hello everybody! I'm new to this list: my name is Silvio, I am Italian and I'm currently working in France. I discovered Python and Jython just two weeks ago: I am using Python to test the APIs of a server platform (CPython for the C API and Jython for the Java one). By now I always found a way to use the same scripts for both CPython and Jython (developing the CPython extension module to emulate the behavior of the Java API). Now I should implement some multi thread tests, but I saw that Python language doesn't support multi thread (at least from what I understood). The only way i could think of for doing it is embedding CPython in a C program that handles the threads using the Python API, and embedding Jython into a Java program that does the same (would it work?). This would lead to very different ways of implementing the tests for the two APIs. Is there any simplest way? bye, Silvio. |
From: Peter B. <bri...@ma...> - 2001-08-07 05:45:38
|
Hi! I've got some jython code that works fine when run with jython but breaks down when compiled and run with java. Here's the message I'm seeing. > Java Traceback: > > at org.python.core.Py.JavaError(Py.java, Compiled Code) > at org.python.core.PyTableCode.call(PyTableCode.java, Compiled Code) > at org.python.core.imp.createFromCode(imp.java, Compiled Code) > at org.python.core.imp.createFromClass(imp.java, Compiled Code) > at org.python.core.imp.loadPrecompiled(imp.java, Compiled Code) > at org.python.core.imp.loadFromPath(imp.java, Compiled Code) > at org.python.core.imp.loadFromPath(imp.java, Compiled Code) > at org.python.core.imp.load(imp.java, Compiled Code) > at org.python.core.imp.load(imp.java, Compiled Code) > at org.python.core.imp.importName(imp.java, Compiled Code) > at org.python.core.imp.importName(imp.java, Compiled Code) > at org.python.core.ImportFunction.load(__builtin__.java, Compiled Code) > at org.python.core.ImportFunction.__call__(__builtin__.java, Compiled Code) > at org.python.core.PyObject.__call__(PyObject.java, Compiled Code) > at org.python.core.__builtin__.__import__(__builtin__.java, Compiled Code) > at org.python.core.imp.importFromAs(imp.java, Compiled Code) > at pbj.jpy.pbjgraph$_PyInner.main$35(pbjgraph.java, Compiled Code) > [...] > Traceback (innermost last): > File "/home/brinkman/prog/java/train/pbjp/pbjgraph.py", line 0, in main > File "/home/brinkman/prog/java/gumbie/MenuMaker.py", line 0, in main > java.lang.ExceptionInInitializerError: java.lang.NullPointerException > I've narrowed it down to trouble with the 'os' package. It appears that I can import it without trouble, but any attempt to use it (e.g., use 'os.curdir' or 'os.path.join') causes an exception like the one above. Any ideas? Thanks, Peter |
From: O'Brien-Strain, E. <eo...@ex...> - 2001-08-06 21:51:03
|
One way to "touch" an existing file in jython is to use the standard Java API as follows: from java.util import Date from java.io import File now = Date().time File(pathname).setLastModified(now) _ Eamonn O'Brien-Strain eo...@hp... HP Labs > -----Original Message----- > [...] To "touch" a file use os.utime, as in: > > now = time.time() > os.utime(pathname, (now, now)) > > Not in Jython, though. |
From: Mats W. <ma...@la...> - 2001-08-06 20:28:06
|
>Each time I started tomcat and my jython servlet, the package manager >reported about new jar files, although they were already recognized during >previous starts. The package manager creates each time a new file in the >cachedir: myjar.pkc, myjar$1.pkc, myjar$2.pkc, ... This happens also to >jython.jar (jython.pkc, jython$1.pkc, ...). I just observed something ?perhaps? similar which has nothing to do with Tomcat... I don't use Jython much for "embedding", but I just tried out one of my examples on 2.1a3, and found that (after I fixed the idiot user error that didn't have the correct Jython .jar file in the CLASSPATH) that the package manager ran again, so I have two versions of i18n, rt and sunrasign, as in: i18n.pkc i18n$1.pkc rt.pkc rt$1.pkc sunrasign.pkc sunrasign$1.pkc There is /not/ a dup of jython.pkc. Don't remember this happening before.... (system details, if it matters: Win2000 SP2, Sun Java 1.3.1) Mats |
From: <bc...@wo...> - 2001-08-06 20:18:54
|
On Thu, 26 Jul 2001 14:13:57 +0200 (CEST), you wrote: >Regarding my previous post. I found and applyed the fix for the "Py Meta >Class Bug". Lo and behold the applet runs. >Now I get an error then exceuting the pageHandler function: >"LookupError: no codec search functions registered: can't find encoding" The urllib uses an encoding called "ASCII". Jython 2.1a3 only supports the name "ascii" as a builtin encoding. This particular problem will be fixed in 2.1b1. As a workaround in 2.1a3 you can add this line to the beginning of the script: import encodings.ascii Thank you for reporting this. regards, finn |
From: Mats W. <ma...@la...> - 2001-08-06 20:16:15
|
At 12:47 PM 8/6/2001 -0400, you wrote: >I tried your suggestions with no impact. I was not able to "touch" the .py >files since I am on W2k and do not know the equivalent command, it there is >one. A little Python can take care of the touch part. To "touch" a file use os.utime, as in: now = time.time() os.utime(pathname, (now, now)) Not in Jython, though. Mats |
From: <bc...@wo...> - 2001-08-06 19:46:11
|
[Fred Sells] >I have a jar file that I developed in java1.3 using JBuilder and the >compiler provided with it (I assume jdk 1.3). When I import that file while >running jython, all is well HOWEVER when I jythonc my main (using --all >--jar Main.py) and run it -- I can import the package but it does not have >any visible contents. > >i.e. > >import ezjava >print dir(ezjava) > >["__name__"] is all I get > >the classes in ezjava are all public; I'm stumped. You would get the same result if you use tried it on any other java package. It isn't a problem with your ezjava.jar file. If you want to use dynamic reflection in a staticly compiled program you can try adding code like this somewhere in your Main.py file: if 1 == 0: from ezjava import * It doesn't have to executed as long as the compiler can see the code. Also look for the text Required packages: ezjava* in the jythonc output. regards, finn |
From: Robert W. B. <rb...@di...> - 2001-08-06 17:25:43
|
*Moved to Jython-users On Tue, 7 Aug 2001, syKim wrote: > Hello > > I am trying web program with jython.. > > It have to use database. and, I tried mysql.. > > in python, Mysql-python module exist (a kind of plug-in module) > > but, it is just occasion of Cpython.. > > How can I use Mysql under jython? Is it possible? Oh yes, it is possible. You get to choose using JDBC directly or the wonderful Python DB API 2.0 zxjdbc package. I use zxJDBC mostly now because of the convenience it offers (tnx Brian!). Check it out at www.ziclix.com/zxjdbc You do need the java jdbc driver. It is available at www.mysql.org (click on "downloads" then "Contributed software"). Look for the mm.mysql.jdbc-0.6.tar.gz package- it's the java jdbc driver you want. using JDBC is as simple as below (untested though, there's probably a typo): >>> import java >>> java.lang.Class.forName("org.gjt.mm.mysql.Driver") >>> con = java.sql.DriverManager.getConnection( "jdbc:mysql://host/database","username","passwd"); >>> Stmt = con.createStatement(); >>> rs = Stmt.executeQuery("SELECT * from sometable"); >>> >>> while (rs.next()): print rs.getString("field") zxJDBC usage is best gotten from the nice documentation that comes with it. The examples Brian includes with zxJDBC are specific to mysql- I'm sure you will find them most helpful (www.ziclix.com/zxjdbc/documentation.html). Don't hesitate with future questions- there's a horde of database gurus that lurk about in this list :) Cheers, Robert |
From: Sells, F. <fr...@ad...> - 2001-08-06 16:46:16
|
I tried your suggestions with no impact. I was not able to "touch" the .py files since I am on W2k and do not know the equivalent command, it there is one. I notice that my ezjava.jar manifest does not define any of the classes in the file. Other's who know java but not jython indicate that could be the culprit. So far, I've not found any useful information on the manifest, but am continuing to search. any ideas????????? -----Original Message----- From: John Mudd [mailto:joh...@ya...] Sent: Friday, August 03, 2001 2:29 PM To: Sells, Fred; Jyt...@li... Cc: 'fr...@su...' Subject: Re: [Jython-users] jythonc debug help The traceback is always line 0. Yes, that's normal unfortunately. Build problem? Here are the rules that I follow: Build jar files using jythonc: (+) Set CLASSPATH for running even when just compiling. (+) Add jython.jar to CLASSPATH while compiling! export CLASSPATH=$CLASSPATH:/home/mudd/jython-2.1a1/jython.jar (+) rm *class; rm <target>.jar; rm -rf jpywork; touch *py (+) jythonc -all --package com.proj.test --jar testRepo.jar $(JYTHONSRCS) <------ With --all, no jython jar needed to run. (+) Run again if get "too many files" error. --- "Sells, Fred" <fr...@ad...> wrote: > I have a fairly large application that runs fine under jython. > > When I try to run it as a jar file, doing > > >jythonc --core --deep --jar xxx.jar Main.py > > >java -jar xxx.jar > > I get a null pointer exception and the python style traceback is > always line > 0 > > I'm using jython20, jdk1.3 and JBuilder 4's JDBC classes. Is there > any way > to get better info other than disabling sections of code until I > isolate the > offending section. > > tia > > Fred > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Adrian S. J. <as...@pa...> - 2001-08-06 14:29:43
|
Hi, Is there any simple way of saving the complete state of a Jython interpreter to a stream? I understand that Pickles don't save the implementation, just the data. To complicate things further, I have several interpreters running in the same process and they share objects and classes between them. My first attempt has been to Serialize the dictionaries, but it breaks with a NotSerializableException because the PythonInterpreter isn't serializeable. Is it likely to break anything if I just make it serializeable? Thanks, Adrian. -- Adrian St. John - as...@pa... Pan Security International |
From: Waclawczyk J. <Jan...@ic...> - 2001-08-06 07:50:48
|
Hi, I installed and ran JythonSerlvet on tomcat3.2.3 and with jython-2.1a2 as described at http://jywiki.sourceforge.net/index.php?JythonServlet. The first example hello.py works fine ! Then I tried to copy my jar files to the directory <context>/WEB-INF/lib and use them within my jython servlet scripts (i.e. I import java classes in these scripts) but it didn't function: the package manager reported about all these new jar files, but that's all: when running script I got exception: ClassNotFoundException for classes included in those jar files. Each time I started tomcat and my jython servlet, the package manager reported about new jar files, although they were already recognized during previous starts. The package manager creates each time a new file in the cachedir: myjar.pkc, myjar$1.pkc, myjar$2.pkc, ... This happens also to jython.jar (jython.pkc, jython$1.pkc, ...). I placed then all the jar files in the CLASSPATH before running tomcat and all my servlet scripts worked fine ! What's wrong ? Regards, Janusz Waclawczyk |
From: Stuart S. <st...@me...> - 2001-08-05 03:58:25
|
I ran pystone under Jython with >>>execfile(".../pystone.py"); on my iPAQ, and got time=90.852 110.069 Pystone but I'm using SaveJe XE (0.1.1 beta, see www.savaje.com), and Java 1.3.0 (Jython 2.0), on the 3635. Interestingly enough, Jython is apparently the only development environment currently available within SavaJe XE (on the iPAQ and NetBook platforms). It will run compiled Java 2 SE applications (has a JRE), but there is no compiler (JDK). Just my handy dandy Jython interpreter... (thank you Finn!) Stuart Brian Zhou wrote: > If you got standard Python 2.1.1, copy lib/test/__init__.py to your jython > directory. This makes all files under test/ available as modules. If you > don't, it's actually a dummy one-line file, so I think touch a new one will > do too: > > # Dummy file to make this directory a package. > > Then, from J9 Console > > Jython 2.1a3 on java1.2.2 subset (JIT: null) > Type "copyright", "credits" or "license" for more information. > >>> from test import pystone > >>> pystone.main() > Pystone(1.1) time for 10000 passes = 205.544 > This machine benchmarks at 48.6514 pystones/second > >> > > Hope your iPaq is faster than mine ;-) > > -Brian |
From: Brian Z. <bri...@ya...> - 2001-08-05 02:49:55
|
If you got standard Python 2.1.1, copy lib/test/__init__.py to your jython directory. This makes all files under test/ available as modules. If you don't, it's actually a dummy one-line file, so I think touch a new one will do too: # Dummy file to make this directory a package. Then, from J9 Console Jython 2.1a3 on java1.2.2 subset (JIT: null) Type "copyright", "credits" or "license" for more information. >>> from test import pystone >>> pystone.main() Pystone(1.1) time for 10000 passes = 205.544 This machine benchmarks at 48.6514 pystones/second >> Hope your iPaq is faster than mine ;-) -Brian ----- Original Message ----- From: "Ted Shab" <ts...@ya...> To: <jyt...@li...> Sent: Friday, August 03, 2001 12:10 PM Subject: [Jython-users] Jython on iPAQ > j9 examples run fine, but I can't import pystone. > > Here is my shortcut - > 119#"\vame1.3\j9.exe" "-bp:\vame1.3\classes.zip" > "-cp:\JRE1.1\lib\rt.jar;\jython-2.1a3\jython.jar" > "org.python.util.jython" > > I used the largest classes.zip from the vame > distribution. > > Any ideas? > > Also - has anyone gotten AWT working from jython on > the iPAQ? > > Best, > > Ted > > > Steps involved: > > =========== > > > > 1. download from http://www.embedded.oti.com/ and > > install j9 to pocketpc > > \vame1.3, make sure you can run the demos > > 2. download jython2.1a1 from http://www.jython.org , > > copy \jython-2.1a1 to > > pocketpc \jython-2.1a1 > > 3. copy Sun's JRE1.1.8 files from "C:\Program > > Files\JavaSoft\JRE\1.1" to > > pocketpc \JRE1.1 > > 4. create a shortcut RunJython.lnk using the > > following > > 4 lines concated (on > > a single line seperated by " ") on your desktop PC > > and > > copy it to > > \jython-2.1a1: > > 119#"\vame1.3\j9.exe" > > "-bp:\vame1.3\classes.zip" > > "-cp:\JRE1.1\lib\rt.jar;\jython-2.1a1\jython.jar" > > "org.python.util.jython" > > > > Sample session: > > =============== > > Jython 2.1a1 on java1.2.2 subset (JIT: null) > > Type "copyright", "credits" or "license" for more > > information. > > >>> import java > > >>> print java.util.Date() > > Mon Jun 18 23:15:28 PDT 2001 > > >>> import pystone > > >>> pystone.main() > > Pystone(1.1) time for 10000 passes = 202.265 > > This machine benchmarks at 49.4401 pystones/second > > >>> > > > > > > Wish: > > ===== > > 0. it's still too slow; > > 1. J9 Console gets updated so that it complies to > > latest pocketpc UI > > standard (right now the menubar is on the bottom, > > and > > the input text field > > gets blocked by the tiny keyboard); > > 2. We can do without rt.jar. I tried to put > > classes.zip into classpath but > > it does not work; without rt.jar jython cannot > > "import > > java". Any other > > idea? > > > > Congrats to the J9 team and the jython team! > > > > -Brian > > > > Just got myself an iPaq 3670, and tried Sun's > > Personal > > Java > > > http://developer.java.sun.com/developer/earlyAccess/personaljava/ > > on it, it > > runs okay. This is basicly a Java1.1 runtime without > > Swing, but awt and JNI > > is supported. > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Make international calls for as low as $.04/minute > > with Yahoo! Messenger > > http://phonecard.yahoo.com/ > > > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Fred S. <fr...@su...> - 2001-08-03 20:05:46
|
I'll give the hints below a try, meanwhile I've isolated the problem better. I have a jar file that I developed in java1.3 using JBuilder and the compiler provided with it (I assume jdk 1.3). When I import that file while running jython, all is well HOWEVER when I jythonc my main (using --all --jar Main.py) and run it -- I can import the package but it does not have any visible contents. i.e. import ezjava print dir(ezjava) ["__name__"] is all I get the classes in ezjava are all public; I'm stumped. John Mudd wrote: > The traceback is always line 0. Yes, that's normal unfortunately. > > Build problem? Here are the rules that I follow: > > Build jar files using jythonc: > (+) Set CLASSPATH for running even when just compiling. > (+) Add jython.jar to CLASSPATH while compiling! > export CLASSPATH=$CLASSPATH:/home/mudd/jython-2.1a1/jython.jar > (+) rm *class; rm <target>.jar; rm -rf jpywork; touch *py > (+) jythonc -all --package com.proj.test --jar testRepo.jar > $(JYTHONSRCS) <------ With --all, no jython jar needed to run. > (+) Run again if get "too many files" error. > > --- "Sells, Fred" <fr...@ad...> wrote: > > I have a fairly large application that runs fine under jython. > > > > When I try to run it as a jar file, doing > > > > >jythonc --core --deep --jar xxx.jar Main.py > > > > >java -jar xxx.jar > > > > I get a null pointer exception and the python style traceback is > > always line > > 0 > > > > I'm using jython20, jdk1.3 and JBuilder 4's JDBC classes. Is there > > any way > > to get better info other than disabling sections of code until I > > isolate the > > offending section. > > > > tia > > > > Fred > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > http://lists.sourceforge.net/lists/listinfo/jython-users > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ |
From: Ted S. <ts...@ya...> - 2001-08-03 19:10:49
|
j9 examples run fine, but I can't import pystone. Here is my shortcut - 119#"\vame1.3\j9.exe" "-bp:\vame1.3\classes.zip" "-cp:\JRE1.1\lib\rt.jar;\jython-2.1a3\jython.jar" "org.python.util.jython" I used the largest classes.zip from the vame distribution. Any ideas? Also - has anyone gotten AWT working from jython on the iPAQ? Best, Ted > Steps involved: > =========== > > 1. download from http://www.embedded.oti.com/ and > install j9 to pocketpc > \vame1.3, make sure you can run the demos > 2. download jython2.1a1 from http://www.jython.org , > copy \jython-2.1a1 to > pocketpc \jython-2.1a1 > 3. copy Sun's JRE1.1.8 files from "C:\Program > Files\JavaSoft\JRE\1.1" to > pocketpc \JRE1.1 > 4. create a shortcut RunJython.lnk using the > following > 4 lines concated (on > a single line seperated by " ") on your desktop PC > and > copy it to > \jython-2.1a1: > 119#"\vame1.3\j9.exe" > "-bp:\vame1.3\classes.zip" > "-cp:\JRE1.1\lib\rt.jar;\jython-2.1a1\jython.jar" > "org.python.util.jython" > > Sample session: > =============== > Jython 2.1a1 on java1.2.2 subset (JIT: null) > Type "copyright", "credits" or "license" for more > information. > >>> import java > >>> print java.util.Date() > Mon Jun 18 23:15:28 PDT 2001 > >>> import pystone > >>> pystone.main() > Pystone(1.1) time for 10000 passes = 202.265 > This machine benchmarks at 49.4401 pystones/second > >>> > > > Wish: > ===== > 0. it's still too slow; > 1. J9 Console gets updated so that it complies to > latest pocketpc UI > standard (right now the menubar is on the bottom, > and > the input text field > gets blocked by the tiny keyboard); > 2. We can do without rt.jar. I tried to put > classes.zip into classpath but > it does not work; without rt.jar jython cannot > "import > java". Any other > idea? > > Congrats to the J9 team and the jython team! > > -Brian > > Just got myself an iPaq 3670, and tried Sun's > Personal > Java > http://developer.java.sun.com/developer/earlyAccess/personaljava/ > on it, it > runs okay. This is basicly a Java1.1 runtime without > Swing, but awt and JNI > is supported. > > > > __________________________________________________ > Do You Yahoo!? > Make international calls for as low as $.04/minute > with Yahoo! Messenger > http://phonecard.yahoo.com/ __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ |
From: John M. <joh...@ya...> - 2001-08-03 18:28:47
|
The traceback is always line 0. Yes, that's normal unfortunately. Build problem? Here are the rules that I follow: Build jar files using jythonc: (+) Set CLASSPATH for running even when just compiling. (+) Add jython.jar to CLASSPATH while compiling! export CLASSPATH=$CLASSPATH:/home/mudd/jython-2.1a1/jython.jar (+) rm *class; rm <target>.jar; rm -rf jpywork; touch *py (+) jythonc -all --package com.proj.test --jar testRepo.jar $(JYTHONSRCS) <------ With --all, no jython jar needed to run. (+) Run again if get "too many files" error. --- "Sells, Fred" <fr...@ad...> wrote: > I have a fairly large application that runs fine under jython. > > When I try to run it as a jar file, doing > > >jythonc --core --deep --jar xxx.jar Main.py > > >java -jar xxx.jar > > I get a null pointer exception and the python style traceback is > always line > 0 > > I'm using jython20, jdk1.3 and JBuilder 4's JDBC classes. Is there > any way > to get better info other than disabling sections of code until I > isolate the > offending section. > > tia > > Fred > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger http://phonecard.yahoo.com/ |
From: Sells, F. <fr...@ad...> - 2001-08-03 14:52:06
|
I have a fairly large application that runs fine under jython. When I try to run it as a jar file, doing >jythonc --core --deep --jar xxx.jar Main.py >java -jar xxx.jar I get a null pointer exception and the python style traceback is always line 0 I'm using jython20, jdk1.3 and JBuilder 4's JDBC classes. Is there any way to get better info other than disabling sections of code until I isolate the offending section. tia Fred |
From: Liu, J. (C-BASS) <Jes...@c-...> - 2001-07-31 16:04:14
|
I am running multiple processes using jython2.0 in NFS. These processes may have different python paths but use the same cache dir and access the same files there. Is there any danger these processes will clobber each other and produce unpredictable results, i.e. using a wrong package? What exactly would a Package Manager do in this case? Thanks. Jesse Liu |
From: Joern E. <Joe...@mi...> - 2001-07-30 13:44:34
|
Hi again > I've attached the log-file, the script and my version of string.py (please see attached file.zip) ... ... but obviously I cannot send any kind of files through a mailing-list. For anybody who's interested here the files as stated: The script # ---------- start of script import java java.lang.System.getProperty("python.home") java.lang.System.getProperty("python.path") import sys sys.path.append("c:\\program files\\jython") sys.path.append("c:\\program files\\jython\\lib") print "python.home: ",java.lang.System.getProperty("python.home") print "python.path: ",java.lang.System.getProperty("python.path") print "sys.path: ",sys.path print "sys.prefix: ",sys.prefix # Import support for strings import string # Get the value of the scalar node value = scriptinterface.getNodeValue(".1.3.6.1.4...") # Convert value to INT valueAsInt=string.atoi(value) #valueAsInt=eval(value) # Add 1 to value valueAsInt=valueAsInt+1 # Set a limit of 8 for value if valueAsInt > 8: valueAsInt=1 # Convert valueAsInt back to string value=str(valueAsInt) # Write back (increased) value to node scriptinterface.updateValue(".1.3.6.1.4...",value,"CONST") # ---------- end of script The log-file: Time stamp :Mon Jul 30 11:15:58 GMT+02:00 2001 The command executed : python.home: None python.path: None sys.path: ['.\\jars\\Lib', 'c:\\program files\\jython', 'c:\\program files\\jython\\lib'] sys.prefix: .\jars\ Traceback (innermost last): File "D:\AdventNet\simulator\mibs\_behavior_scripts_\counter_with_import.py", line 17, in ? File "C:\Program Files\Jython\Lib\string.py", line 418, in ? java.lang.NoSuchMethodError at string$py.f$0(C:\Program Files\Jython\Lib\string.py) at string$py.call_function(C:\Program Files\Jython\Lib\string.py) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:150) at org.python.core.imp.createFromPyClass(imp.java:70) at org.python.core.imp.loadFromPath(imp.java:283) at org.python.core.imp.loadFromPath(imp.java:227) at org.python.core.imp.load(imp.java:343) at org.python.core.imp.load(imp.java:362) at org.python.core.imp.importName(imp.java:417) at org.python.core.imp.importName(imp.java:444) at org.python.core.imp.importOne(imp.java:448) at org.python.pycode._pyx0.f$0(D:\AdventNet\simulator\mibs\_behavior_script s_\counter_with_import.py) at org.python.pycode._pyx0.call_function(D:\AdventNet\simulator\mibs\_behav ior_scripts_\counter_with_import.py) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.Py.runCode(Py.java:937) at org.python.core.__builtin__.execfile(__builtin__.java:273) at org.python.core.__builtin__.execfile(__builtin__.java:277) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:131) at com.adventnet.snmp.simulator.agent.PyInterpreter.executeScript(PyInterpr eter.java:253) at com.adventnet.snmp.simulator.agent.XMLHandler.processScalarScript(XM LHandler.java:2089) at com.adventnet.snmp.simulator.agent.XMLHandler.processGetRequest(XMLHandl er.java:420) at com.adventnet.snmp.simulator.agent.RegObject.processGetRequest(RegObject .java:604) at com.adventnet.snmp.simulator.agent.RegObject.getRequest(RegObject.java:364) at com.adventnet.snmp.snmp2.agent.VarBindRequestListenerHolder.processGetVa rBinds(VarBindRequestListenerHolder.java:736) at com.adventnet.snmp.snmp2.agent.PduRequestHandler.processGetReqMesg(PduRe questHandler.java:775) Exception while executing the Python Script at com.adventnet.snmp.snmp2.agent.PduRequestHandler.getRequest(PduRequestHa ndler.java:682) at com.adventnet.snmp.snmp2.agent.PduRequestHandler.processSnmpPduRequest(P duRequestHandler.java:335) at com.adventnet.snmp.snmp2.agent.SnmpAgent.callback(SnmpAgent.java:770) at com.adventnet.snmp.snmp2.SnmpSession.processPacket(SnmpSession.java: 2342) at com.adventnet.snmp.snmp2.SnmpCallback.processPacket(SnmpCallback.java:240) at com.adventnet.snmp.snmp2.SnmpCallback.run(SnmpCallback.java:119) java.lang.NoSuchMethodError: java.lang.NoSuchMethodError python.home: None python.path: None sys.path: ['.\\jars\\Lib', 'c:\\program files\\jython', 'c:\\program files\\jython\\lib', 'c:\\program files\\jython', 'c:\\program files\\jython\\lib'] sys.prefix: .\jars\ python.home: None python.path: None sys.path: ['.\\jars\\Lib', 'c:\\program files\\jython', 'c:\\program files\\jython\\lib', 'c:\\program files\\jython', 'c:\\program files\\jython\\lib', 'c:\\program files\\jython', 'c:\\program files\\jython\\lib'] sys.prefix: .\jars\ The concerned lines from string.py: ... # Try importing optional built-in module "strop" -- if it exists, # it redefines some string operations that are 100-1000 times faster. # It also defines values for whitespace, lowercase and uppercase # that match <ctype.h>'s definitions. try: # the following line is no. 418 from strop import maketrans, lowercase, uppercase, whitespace letters = lowercase + uppercase except ImportError: pass # Use the original versions |
From: Joern E. <Joe...@mi...> - 2001-07-30 13:21:21
|
Hi all. Here are now the latest results from my try to import within a script. Likely this will be the last e-mil from me. At the moment I'm the doc-writer-man because my practical work (I'm a student) will be finished in two weeks, therefore I have to write one report for my employer as well as one for the Fachhochschule (It's comparable to a college). Ok guys, here we go: > On Wed, 25 Jul 2001, Joern Eckhoff wrote: > > now my script looks like this: > > > > # ----------- begin ob script > > import java > > java.lang.System.getProperty("python.home") > > java.lang.System.getProperty("python.path") > > > > import sys > > sys.path.append("c:\\program files\\jython;c:\\program files\\jython\\lib") > > This append may be the culprit. Sorry if I've missed this in earlier > mails, but for... > > sys.path.append("c:\\;c:\\windows\\desktop") > import test # a Jython script on my desktop > > The above does not work. sys.path is a list of individual directories, > rather than system directory representations (e.g. > ["\\path\\one", "\\path\\two"] instead of \\path\\one;\\path\\two). > Instead, if I use: > > sys.path.append("c:\\") > sys.path.append("c:\\windows\\desktop") > import test # a Jython script on my desktop > > All is well. So, give this a try: > > sys.path.append("c:\\program files\\jython\\Lib") # only one dir > # or > sys.path.extend( > ("c:\\program files\\jython", "c:\\program files\\jython\\Lib") > ) I've changed this part of my script and now it looks like this: import sys sys.path.append("c:\\program files\\jython") sys.path.append("c:\\program files\\jython\\lib") > > print "python.home: ",java.lang.System.getProperty("python.home") > > print "python.path: ",java.lang.System.getProperty("python.path") > > print "sys.path: ",sys.path > > print "sys.prefix: ",sys.prefix > > > > # Import support for strings > > import string > > > > # Get the value of the scalar node > > value = scriptinterface.getNodeValue(".1.3.6.1...") > > > > # Convert value to INT > > valueAsInt=string.atoi(value) > > > > # Add 1 to value > > valueAsInt=valueAsInt+1 > > > > # Set a limit of 8 for value > > if valueAsInt > 8: > > valueAsInt=1 > > > > # Convert valueAsInt back to string > > value=str(valueAsInt) > > > > # Write back (increased) value to node > > scriptinterface.updateValue(".1.3.6.1...",value,"CONST") > > # ----------- end ob script <snip> > > - the > > '.\\jars\\Lib' is the path leading to the jars containing all the > > class-files of the AgentSimulator. The module 'string.py' actually is > > present at 'c:\program files\jython\lib'. Doesn't it indicate the path to > > the modules is missing? Does jython use sys.path as well as python.path? > > Properties, like python.path, python.home and etcettera, are all about > initializing Jython. Java code takes steps to set Jython's system state > before actually creating the interpreter instance, and these property > values are what is used in these steps. The main step is > PythonInterpreter.initialize(), but remember that this method should be > called before instantiating an interpreter. After instantiation, Jython's > sys module as the final word. python.path is added to the sys.path during > initialization. Following that, what is in sys.path is the final word. Ok, I see. Then it wouldn't wonder that the script now works. There's only one blemish left. When starting the script _the first time_ (i.e. when PythonInterpreter is initialized the first time after restart) it results in a NoSuchMethodError thrown by the module string.py in line 418. I've attached the log-file, the script and my version of string.py (please see attached file.zip) to let you have a look at it. For me it looks like string.py couldn't find the module named strop.?. I've searched for it with mask *strop*.* at c:\ and all subfolders but the only file I've found was test_strop.py at c:\program files\Python\Lib\test. I guess everthing will be all right after adding strop.? to my installation. <snip> > Cheers, > Robert cu Joe |
From: <bc...@wo...> - 2001-07-29 21:20:59
|
I am happy to announce the third alpha release of Jython 2.1. Jython is a Java implementation of the Python programming language. It allows users to compile Python source code to Java byte codes, and run the resulting bytecodes on any Java Virtual Machine. It is a very seamless and smooth integration with Java: from Python you have complete access to all Java libraries, can build applets, can integrate with Java beans, and can subclass Java classes in Python and vice versa. Like Python, and unlike Java, Jython can also be used interactively: just type some Jython code at the prompt and see the results immediately. A java installer is available for download at the Jython website: http://www.jython.org/ Installation on version 2.1a3 is similar to version 2.0. Further information and tips on installation is available at: http://www.jython.org/install.html Jython 2.1 aims to be feature compatible with Python 2.1.1 and among the new feature are: - A settable console encoding will allow windows users to enter national characters at the command prompt. - The names of zip- and jarfiles can be added to sys.path. A complete list of changes and differences are available here: http://www.jython.org/NEWS.html A list of fixed bugs can be found here: http://sourceforge.net/tracker/?group_id=12867&atid=112867 Change the Status input box to "Closed" and the Group input box to "Fixed in 2.1a3" and press the "Browse" button. Bugs can be reported to the bug manager on SourceForge: http://sourceforge.net/bugs/?group_id=12867 Cheers, the jython-developers |
From: <bc...@wo...> - 2001-07-27 12:08:35
|
[Mats] > >>I am using Jython 2.1a1 and JDK (from Sun) 1.3.1 > > > >... and I believe 1.3.1 is the real problem. Even if it isn't, I > >strongly doubt you can make java1 applets with a java2 JVM. You will > >need to get hold of and install a JDK1.1 and use that when running > >jythonc. > >I'm wondering if there are any sensible solutions to this. >Can the 1.1 JDK coexist with a 1.3? It can. I have JDK1.1.7A, JDK1.2.1, JDK1.3, JDK1.4, IBMJava1.3 and MS-SDK4.0 all installed in the same directory. Some hints (for windows) off the top of my head include: - I don't set PATH or CLASSPATH in the controlpanel. Instead I have some small .bat scripts that let me choose java versions. - When installing a Java2 from javasoft, I *always* remove the java.exe file in the windows system directory (c:\WINNT\system32 IIRC). >I had understood that the purpose of the "Java plugin" that >now comes bundled with the 1.3.x distribution kit was for >this reason: you can't count on the browser, but you can >add a plugin to take care of it. I haven't had any joy >making that work, however. Is there something special one >can do - thus enabling a 1.3-built Applet to run? i've >sometimes detected that the plugin is active, but I seem >never to have gotten it to work for a Jython-built applet. Sorry, I have no experience with the plugin. Anyone else? I think it is possible to make a sandboxed plugin applets, but not all the infrastructure is in place for applets that want to move outside the default security. >I don't believe this compatibility headache is unique to >Jython, but the situation's not going to get better: Sun's >started the end-of-life track on the 1.1 JDK (thus "continue >to build with 1.1" is not going to remain a viable story). When java1 applets are the goal, I doubt there is any alternatives. We may be able toi improve the situation slightly, so that it isn't necessary to have jython installed with the jdk1.1. But the jdk1.1 class files (classes.zip) must still be available when building applets. regards, finn |