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: <bc...@wo...> - 2001-08-24 18:44:11
|
[Brian Zhou] >I know jython works with MS jview, how does it solve the boot.class.path? It requires that clspack -auto have been run. That places all classes in a classes.zip file that is available on the "java.class.path" system property: Jython 2.1a3 on java1.1.4 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import java >>> for p in java.lang.System.getProperty("java.class.path").split(";"): ... print p ... C:\WINNT\java\trustlib\ C:\WINNT\java\classes\classes.zip C:\WINNT\java\classes\ D:\jython\jython-2.1a3-jview\ regards, finn |
From: Kevin B. <kb...@ca...> - 2001-08-24 16:46:36
|
Peter Bengtsson wrote: > > So, I want to create a little chatwindow JavaApplet that is downloaded once > to the visitor and then, from there can make constant requests to an > application server back and forth without having to reload the page. > > Can this be done with Jython better than other tools? While you can do this with Jython, you'd probably be better off just using Javascript to reload the display frame every time you send new information from the edit frame. This will reduce the load on your network & app server, and instead of requiring the browser to support Java & a large applet, it only needs to support JavaScript. kb |
From: Peter B. <ma...@pe...> - 2001-08-24 16:03:14
|
On the Jython homepage it said that the mailing list wants to know what I want to do with Jython etc. Well, here's my story which ends with "Can this be done with Jython better than other tools?" I can build a HTML page with a form in which one can submit text in a textarea and send off the request to an application server that does something with the data and returns back to the form. And on the same page, or framed, I have a little box that displays some text that is sucked in from the application server. One read window and one write window. I want it to work kind of like a chat box. But with webpages PUSH request aren't supported so the only solution to seek for new messages often is to auto-reload the page. Constant auto-reloading will be a pain in the back and the page will generally be slow. The application server I have in mind is Zope which is built on Python, and that's where I expect the "talking" to be done. The end user application is a chat window, and I bet that there are lots of existing free built GUIs for chatting on the web that can be used. So, I could take some chat application from the net, but my project is big enough for spending some time on coding and not just connecting chords together. I don't know any Java at all (yet :), but I know Python and that's what I want to use as much as possible if possible. So, I want to create a little chatwindow JavaApplet that is downloaded once to the visitor and then, from there can make constant requests to an application server back and forth without having to reload the page. Can this be done with Jython better than other tools? Best regards, Peter |
From: <KG...@ne...> - 2001-08-24 15:18:12
|
Hello All . . I am "playing around" with jython, & come up against an error . . . First the vitals: Jython-2.0 on Windows2000 Sun Java 1.3.1 or RH Linux 7.1 w/ blackdown JDK 1.3.1 I compile the HelloApplet w/ Jythonc && the --jar --core options & run using Appletviewer (I am using a jar instead of class) - works OK I make a modification to HelloApplet.py - "import urllib" rebuild & run appletviewer, then I get an init error <snip> Traceback (innermost last): File "/root/jython-2.0/Demo/applet/HelloApplet.py", line 0, in main File "/root/jython-2.0/Lib/urllib.py", line 0, in main java.lang.ExceptionInInitializerError: java.lang.NullPointerException at org.python.modules.os.<clinit>(os.java:11) at java.lang.reflect.Method.invoke(Native Method) at org.python.core.PyJavaClass.initialize(PyJavaClass.java:108) at org.python.core.PyJavaClass.lookupGivingClass(PyJavaClass.java:666) at org.python.core.PyClass.lookup(PyClass.java:164) at org.python.core.PyJavaClass.__findattr__(PyJavaClass.java:712) at org.python.core.PyObject.__getattr__(PyObject.java:670) at urllib$_PyInner.main$86(urllib.java:2808) <snip> I AM a newbie, am I doing something wrong?? - this arrangement works OK when I use std jython to invoke it (added main function at bottom) Thanks, Kelly __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ |
From: Frode R. <fro...@er...> - 2001-08-24 10:18:00
|
> Hi, > I was trying to use the telnetlib module to open interactive session to > another machine. However select module is not present in jython. Is there > any plan to provide select in jython. > > Thx > Gautam > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users Hi, I have grab the telnet lib from "The Java Telnet Applet" and make some small modification so it be more as a library for Jython. Her is a example who I use it: from telnet import TelnetWrapper telnet = TelnetWrapper("123.45.78.90") telnet.login("loginname", "password") result = telnet.sendLine("ls") print result telnet.disconnect() If somebody want this library send me a mail and will send it. -- /Frode Reinsnes |
From: brian z. <bz...@zi...> - 2001-08-24 06:26:18
|
Version 2.1 of zxJDBC has just been released The zxJDBC package provides a nearly 100% Python DB API 2.0 compliant interface for database connectivity in Jython. It is implemented entirely in Java and makes use of the JDBC API. This means any database capable of being accessed through JDBC, either directly or using the JDBC-ODBC bridge, can be manipulated using zxJDBC. Go to the zxJDBC web page for more details: http://www.ziclix.com/zxjdbc Download it here: http://prdownloads.sourceforge.net/zxjdbc/zxJDBC-2.1.zip http://prdownloads.sourceforge.net/zxjdbc/zxJDBC-2.1.tar.gz What's new: - Added the ability to choose dynamic or static iteration of the underlying ResultSet (see the documentation for a discussion on when to use which flavor). - Added ability to instantiate a zxJDBC connection from a DataSource or through a JNDI lookup. - Added 'pipe' package to assist in transfering data between a sink and a source, such as another database, an xml document or csv file. - Fixed bug in PyCursor which did correctly add any SQLWarnings to .warnings - Fixed all thrown exceptions from within Java code to properly be caught in Python try/excepts. - Made all classes Jython 2.1 compatible by implementing ClassDictInit. - Added DataHandlerFilter to facilitate custom datahandlers. - Loads of new unit tests. - Some performance improvements. Compatibility: - Tested with Jython 2.1a2+. It might work with older versions, but it has not been tested. - Tested with Java 1.3. thanks, brian |
From: Brian Z. <bri...@ya...> - 2001-08-23 22:17:09
|
I know jython works with MS jview, how does it solve the boot.class.path? Below is the related-conversation in ibm.software.vame. -Brian "Patrick Mueller" <pat...@ot...> wrote in message news:9m3r1e$rug$1...@ne...... > Our classes.zip needs to be on the -bp. Don't bother putting it on the -cp. > Our jclMax is only 3M unzipped, is jython really 6M? Also, our classes.zip > file is not compressed. I believe it actually works compressed as well, at > least on most OSes. > > wrt: "import java", perhaps the jython code is sniffing our JCL looking for > some Sun thing, and then getting confused. What does it do on a Win32 box? > > -- > ---------------------------------------------------- > Pat...@ot... > ---------------------------------------------------- > You are right, jclMax is about 3M, jython is 6M. A quick grep in jython source reveals: > private void findAllPackages(Properties registry) { > String paths = registry.getProperty( > "python.packages.paths", > "java.class.path,sun.boot.class.path"); > ... Is there an equivalent property in OTI VM to let others know about its bootclass.path? -Brian > > "Brian Zhou" <bri...@te...> wrote in message > news:9m3fc3$22ic$1...@ne...... > > Hi all, > > > > About two months ago I experimented with jython on WinCE/iPaq and had some > > success, now VAME (IBM visual age micro edition) has released 1.4 (== > 1.3.0 > > jvm), so I tried the new version. > > > > Good news is I don't have to copy Sun's rt.jar, and pystone shows an > > improvement from 48 to 52. But adding \vame1.4\lib\jclMax\classes.zip to > the > > classpath option does not work, I have to work around by using a 9M > > extracted .class tree. > > > > Here's the updated instruction: > > > > 1. download from http://www.embedded.oti.com/ "runtime for ARM PocketPC" > and > > "custom config" > > 2. install the runtime, extract the zip file and copy to pocketpc under > > \vame1.4 > > 3. install the "custom config", copy lib\jclMax to pocketpc \vame1.4\lib > > 4. download jython2.1a3 from http://www.jython.org , copy \jython-2.1a3 to > > pocketpc \jython-2.1a3 > > 5. extract lib\jclMax\classes.zip and copy all subdir/files to pocketpc > > \vame1.4\lib\classes > > 6. 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 your > > pocketpc (-cp:classpath, -bp:bootstrap): > > 132#"\vame1.4\j9.exe" > > "-bp:\vame1.4\lib\jclMax\classes.zip" > > "-cp:\vame1.4\lib\classes;\jython-2.1a3\jython.jar" > > "org.python.util.jython" > > > > Here's the part I hope someone can give me some insight, I want to know > why > > classes.zip cannot be in classpath: > > > > 1. If I leave the classpath as "-cp:\jython-2.1a3\jython.jar", I can > launch > > jython fine, do all the python stuff, while "import java" shows "no module > > named java" > > 2. If I use > "-cp:\vame1.4\lib\jclMax\classes.zip;\jython-2.1a3\jython.jar", > > I got error message: > > *sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip' > > java.lang.IndexOutOfBoundsException > > > > Stack trace: > > java/lang/Throwable.<init>()V > > java/lang/Throwable.<init>(Ljava/lang/String;)V > > java/lang/IndexOutOfBoundsException.<init>(Ljava/lang/String;)V > > java/util/zip/ZipInputStream.read([BII)I > > java/util/zip/ZipInputStream.skip(J)J > > java/io/DataInputStream.skipBytes(I)I > > org/python/core/PackageManager.checkAccess(Ljava/io/InputStream;)I > > > > > org/python/core/CachedJarsPackageManager.addZipEntry(Ljava/util/Hashtable;Lj > > ava/util/zip/ZipEntry;Ljava/util/zip/ZipInputStream;)V > > > > > org/python/core/CachedJarsPackageManager.getZipPackages(Ljava/io/InputStream > > ;)Ljava/util/Hashtable; > > > > > org/python/core/CachedJarsPackageManager.addJarToPackages(Ljava/net/URL;Ljav > > a/io/File;Z)V > > > > > org/python/core/CachedJarsPackageManager.addJarToPackages(Ljava/io/File;Z)V > > org/python/core/PathPackageManager.addClassPath(Ljava/lang/String;)V > > > > org/python/core/SysPackageManager.findAllPackages(Ljava/util/Properties;)V > > > > > org/python/core/SysPackageManager.<init>(Ljava/io/File;Ljava/util/Properties > > ;)V > > org/python/core/PySystemState.initPackages(Ljava/util/Properties;)V > > > > > org/python/core/PySystemState.initialize(Ljava/util/Properties;Ljava/util/Pr > > operties;[Ljava/lang/String;Ljava/lang/ClassLoader;)V > > > > > org/python/core/PySystemState.initialize(Ljava/util/Properties;Ljava/util/Pr > > operties;[Ljava/lang/String;)V > > org/python/util/jython.main([Ljava/lang/String;)V > > > > 3. As mentioned, extract classes.zip to directory and add directory to -cp > > works fine. > > 4. I also tried to jar classes/ directory into a classes.jar but that > caused > > jython to complain "skip bad jar" > > > > Anyone has any idea the cause, or what to do further? I mean it works ok > > right now, except I have to live with this 9M .class tree on a handheld. > > > > Thanks for any help or suggestions, > > > > -Brian > > > > > > > > > > |
From: <bc...@wo...> - 2001-08-23 18:04:04
|
[Ronald_Male] >Once upon a time, I saw a free, reliable package called jnio, which had the >functionality > of select. I believe it lives inside sourceforge.net. If it is "jnios" you mean, then it does not include the "select" module. regards, finn |
From: Brian Z. <bri...@ya...> - 2001-08-23 17:35:00
|
Hi all, About two months ago I experimented with jython on WinCE/iPaq and had some success, now VAME (IBM visual age micro edition) has released 1.4 (== 1.3.0 jvm), so I tried the new version. Good news is I don't have to copy Sun's rt.jar, and pystone shows an improvement from 48 to 52. But adding \vame1.4\lib\jclMax\classes.zip to the classpath option does not work, I have to work around by using a 9M extracted .class tree. Here's the updated instruction: 1. download from http://www.embedded.oti.com/ "runtime for ARM PocketPC" and "custom config" 2. install the runtime, extract the zip file and copy to pocketpc under \vame1.4 3. install the "custom config", copy lib\jclMax to pocketpc \vame1.4\lib 4. download jython2.1a3 from http://www.jython.org , copy \jython-2.1a3 to pocketpc \jython-2.1a3 5. extract lib\jclMax\classes.zip and copy all subdir/files to pocketpc \vame1.4\lib\classes 6. 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 your pocketpc (-cp:classpath, -bp:bootstrap): 132#"\vame1.4\j9.exe" "-bp:\vame1.4\lib\jclMax\classes.zip" "-cp:\vame1.4\lib\classes;\jython-2.1a1\jython.jar" "org.python.util.jython" Here's the part I hope someone can give me some insight, I want to know why classes.zip cannot be in classpath: 1. If I leave the classpath as "-cp:\jython-2.1a1\jython.jar", I can launch jython fine, do all the python stuff, while "import java" shows "no module named java" 2. If I use "-cp:\vame1.4\lib\jclMax\classes.zip;\jython-2.1a1\jython.jar", I got error message: *sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip' java.lang.IndexOutOfBoundsException Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V java/lang/IndexOutOfBoundsException.<init>(Ljava/lang/String;)V java/util/zip/ZipInputStream.read([BII)I java/util/zip/ZipInputStream.skip(J)J java/io/DataInputStream.skipBytes(I)I org/python/core/PackageManager.checkAccess(Ljava/io/InputStream;)I org/python/core/CachedJarsPackageManager.addZipEntry(Ljava/util/Hashtable;Lj ava/util/zip/ZipEntry;Ljava/util/zip/ZipInputStream;)V org/python/core/CachedJarsPackageManager.getZipPackages(Ljava/io/InputStream ;)Ljava/util/Hashtable; org/python/core/CachedJarsPackageManager.addJarToPackages(Ljava/net/URL;Ljav a/io/File;Z)V org/python/core/CachedJarsPackageManager.addJarToPackages(Ljava/io/File;Z)V org/python/core/PathPackageManager.addClassPath(Ljava/lang/String;)V org/python/core/SysPackageManager.findAllPackages(Ljava/util/Properties;)V org/python/core/SysPackageManager.<init>(Ljava/io/File;Ljava/util/Properties ;)V org/python/core/PySystemState.initPackages(Ljava/util/Properties;)V org/python/core/PySystemState.initialize(Ljava/util/Properties;Ljava/util/Pr operties;[Ljava/lang/String;Ljava/lang/ClassLoader;)V org/python/core/PySystemState.initialize(Ljava/util/Properties;Ljava/util/Pr operties;[Ljava/lang/String;)V org/python/util/jython.main([Ljava/lang/String;)V 3. As mentioned, extract classes.zip to directory and add directory to -cp works fine. 4. I also tried to jar classes/ directory into a classes.jar but that caused jython to complain "skip bad jar" Anyone has any idea the cause, or what to do further? I mean it works ok right now, except I have to live with this 9M .class tree on a handheld. Thanks for any help or suggestions, -Brian |
From: <Ron...@Ne...> - 2001-08-23 17:02:41
|
Once upon a time, I saw a free, reliable package called jnio, which had the functionality of select. I believe it lives inside sourceforge.net. Samuele Pedroni <pe...@in...>@lists.sourceforge.net on 08/23/2001 11:34:17 AM Please respond to Samuele Pedroni <pe...@in...> Sent by: jyt...@li... To: jyt...@li... cc: Subject: Re: [Jython-users] Any plans to port select module to java Hi. [Gautam Mulchandani] > > Hi, > I was trying to use the telnetlib module to open interactive session to > another machine. However select module is not present in jython. Is there > any plan to provide select in jython. > AFAIK Java libraries do not offer the functionality required, this will change with Java 1.4, so then there will be a possibility at least... regards. _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: <bc...@wo...> - 2001-08-23 17:01:10
|
[Gautam Mulchandani] > I was trying to use the telnetlib module to open interactive session to >another machine. However select module is not present in jython. Is there >any plan to provide select in jython. I don't know if it can be implemented with the nio package in JDK1.4, but if it can, I'm sure it will be done. I hope somebody else will try to do it because I have no need for the select module myself. regards, finn |
From: <bc...@wo...> - 2001-08-23 16:26:48
|
[Silvio Arcangeli] >Hello everybody, again on asynchronous callback. >I am interacting with the Java API of a CORBA server. Some operations >cannot return an immediate result, and so if I want to know the result of >the operation I have to register a callback object (that must implement an >interface provided with the API) to be called asynchronously from the API >when the operation is completed. >I corrected some bugs (I forgot the self attribute, argh!) When debugging CORBA servers in jython you may find it usefull to set the registry option: python.options.showPythonProxyExceptions=true That makes certain exceptions thrown by jython code far more visible and easier to debug. regards, finn |
From: Samuele P. <pe...@in...> - 2001-08-23 15:34:40
|
Hi. [Gautam Mulchandani] > > Hi, > I was trying to use the telnetlib module to open interactive session to > another machine. However select module is not present in jython. Is there > any plan to provide select in jython. > AFAIK Java libraries do not offer the functionality required, this will change with Java 1.4, so then there will be a possibility at least... regards. |
From: Gautam M. <gmu...@ho...> - 2001-08-23 15:22:07
|
Hi, I was trying to use the telnetlib module to open interactive session to another machine. However select module is not present in jython. Is there any plan to provide select in jython. Thx Gautam _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Robert W. B. <rb...@di...> - 2001-08-23 15:17:42
|
Hello Silvio, The "no current thread" message is unique to v2.0. It is a debug message in the threading.py module that has since been commented out (in versions 2.1+). If you're curious, looking at threading.py explains why it happes, but it is safe to comment it out. line ~520, in the following function. def currentThread(): try: return _active[_get_ident()] except KeyError: print "currentThread(): no current thread for", _get_ident() return _DummyThread() The offending line is the print statement obviously, so you can just change to: ##print "currentThread(): no current thread for:, _get_ident() On Thu, 23 Aug 2001, Silvio Arcangeli wrote: > Hello everybody, again on asynchronous callback. > I am interacting with the Java API of a CORBA server. Some operations > cannot return an immediate result, and so if I want to know the result of > the operation I have to register a callback object (that must implement an > interface provided with the API) to be called asynchronously from the API > when the operation is completed. > I corrected some bugs (I forgot the self attribute, argh!) and now my > asynchronous callback object works, but I have a strange output message > from Jython. > > My code is just like this: > > # implementation of ReportReceiver interface > class getReport(ReportReceiver): > def __init__(self,): > self.received=threading.Event() # event to notify that report has > been received > > def receiveReport(...): # callback method called by the API > ... > self.received.set() > return > > #main program > # register to get the report > receiver=getReport() > registerForReports(receiver) > > # call a CORBA operation > .. > > # and then wait until the report is received > receiver.received.wait() > unregisterForReports() > > > When i execute it it works fine, but Jython prints the following message on > standard output: > currentThread(): no current thread for 2006345 > > (ok, the number can be any:)) > it writes this message just after the receiveReport method sets its > received event. > What is the reason for this message and what does it mean? > > ciao, > Silvio. > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Silvio A. <sar...@mo...> - 2001-08-23 10:12:39
|
Hello everybody, again on asynchronous callback. I am interacting with the Java API of a CORBA server. Some operations cannot return an immediate result, and so if I want to know the result of the operation I have to register a callback object (that must implement an interface provided with the API) to be called asynchronously from the API when the operation is completed. I corrected some bugs (I forgot the self attribute, argh!) and now my asynchronous callback object works, but I have a strange output message from Jython. My code is just like this: # implementation of ReportReceiver interface class getReport(ReportReceiver): def __init__(self,): self.received=threading.Event() # event to notify that report has been received def receiveReport(...): # callback method called by the API ... self.received.set() return #main program # register to get the report receiver=getReport() registerForReports(receiver) # call a CORBA operation ... # and then wait until the report is received receiver.received.wait() unregisterForReports() When i execute it it works fine, but Jython prints the following message on standard output: currentThread(): no current thread for 2006345 (ok, the number can be any:)) it writes this message just after the receiveReport method sets its received event. What is the reason for this message and what does it mean? ciao, Silvio. |
From: Robert W. B. <rb...@di...> - 2001-08-22 16:45:44
|
Hello Andy, On Wed, 22 Aug 2001, habenicht wrote: > hi @ll, > i have installed jython-2.1a3 and console works fine, got some problems > with the .\jython\Demo\javaclasses, i cant get a .java file > here my code: > D:\jython\Demo\javaclasses>jythonc --package pygraph Graph.py > processing Graph This looks promising so far, but did the rest of the jythonc process complete without error? If it did you should find the following files in .\jython\Demo\javaclasses\pygraph: Graph.class Graph$_PyInner.class If these were not created, something failed in the jythonc step. Check the jythonc output to look for clues. If all is well at this point- see below. > D:\jython\Demo\javaclasses>javac pygraph/PythonGraph.java > pygraph/PythonGraph.java:10: cannot resolve symbol > symbol : class Graph > location: class pygraph.PythonGraph > Graph graph; > ^ > pygraph/PythonGraph.java:16: cannot resolve symbol > symbol : class Graph > location: class pygraph.PythonGraph > graph = new Graph(expr); > ^ > 2 errors > > D:\jython\Demo\javaclasses> The CWD and the jython.jar file should be in the classpath. Assuming all classes exist as they should in the pygraph\PythonGraph directory, running "javac -classpath .;\path\to\jython.jar" from within the .\jython\Demo\javaclasses directory should work. -robert |
From: Samuele P. <pe...@in...> - 2001-08-22 15:46:47
|
Hi. > class PClazz(JClazz): > def __setattr__(self,name,value): > if name != 'jfield': > # for python fields, use __dict__ > self.__dict__[name] = value > else: > print "Changing jfield..." > # an then ???? > With the following idiom/hack: JClazz.jfield._doset(self,value) it's not really officially documented/supported. Warning: probably with Jython 2.2 this idiom will change or at least be deprecated. regards, Samuele Pedroni. |
From: <dam...@eu...> - 2001-08-22 15:31:06
|
Hi all, I'm new to [p|j]ython and have a question regarding __setattr__. I have a Java class: public JClazz { public int jfield ; } I want to subclass JClass in python and use the __setattr__ special method to customize access to the jfield attribute, for, say, print a message when jfield is being changed from python: class PClazz(JClazz): def __setattr__(self,name,value): if name != 'jfield': # for python fields, use __dict__ self.__dict__[name] = value else: print "Changing jfield..." # an then ???? My question: is there any way to set the jfield without using self.jfield which would cause a fatal recursive call to __setattr__ (ie similar to accessing __dict__ directly) ? |
From: habenicht <hab...@ac...> - 2001-08-22 14:47:59
|
hi @ll, i have installed jython-2.1a3 and console works fine, got some problems = with the .\jython\Demo\javaclasses, i cant get a .java file here my code: D:\jython\Demo\javaclasses>jythonc --package pygraph Graph.py processing Graph D:\jython\Demo\javaclasses>javac pygraph/PythonGraph.java pygraph/PythonGraph.java:10: cannot resolve symbol symbol : class Graph location: class pygraph.PythonGraph Graph graph; ^ pygraph/PythonGraph.java:16: cannot resolve symbol symbol : class Graph location: class pygraph.PythonGraph graph =3D new Graph(expr); ^ 2 errors D:\jython\Demo\javaclasses> could someone tell me whats wrong????? PLLLZZZZZZ!! cheers and regards andy |
From: Alan L. <al...@li...> - 2001-08-21 17:55:57
|
In addition to the use of interp.exec(), interp.eval() can be used to return values back to the Java side -- however you'll have to dig around a bit in the API docs for PyObject, PyInstance, PyTuple etc to learn how to get the underlying Java object out of the returned, wrapped, data. I've got Jython running a Java-based web server whose servlets (JSP) call into Jython to do dynamic evaluation of elements in a database which return Python objects to the servlets which then strip out the Java goodies to generate pages --- all works crisply and reliably. Alanl -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Robert W. Bill Sent: Tuesday, August 21, 2001 9:53 AM To: Young-Jin Lee Cc: jyt...@li... Subject: Re: [Jython-users] [Q] newbie's question on Jython On Tue, 21 Aug 2001, Young-Jin Lee wrote: > Hi, all. > I have a question on the imbedded Jython. It seems like that a Java > application can use a Jython as an interpreter module, but I'm not sure > what kind of things can be done with the imbedded Jython. Anything you can do in Jython can be done with the embedded interpreter. > For example, > can a Java application call a user-defined Python method through a > Jython interpreter? Yes, with ease. > If it cannot be done, is there any other way to do > this? Using the embedded interpreter is best. > I need a Java interpreter module.... Here's an example... import java.util.Properties; import org.python.util.PythonInterpreter; public class embeddingExample { protected PythonInterpreter interp; public static void main(String[] args) { embeddingExample embed = new Embedding(); embed.startInterp(); embed.test(); } protected void startInterp() { Properties props = new Properties(); if (System.getProperty("python.home") == null) props.put("python.home", "/usr/local/jython"); PythonInterpreter.initialize(preProps, postProps, argv); interp = new PythonInterpreter(); } public void useInterp() { // define and call a Jython function interp.exec("def test(message):\n" + " print message"); interp.exec("test('Hello world')"); // you can import Python modules as use them just as easily interp.exec("import glob\n" + "print glob.glob('*')"); } } Enjoy, Robert _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Robert W. B. <rb...@di...> - 2001-08-21 17:47:56
|
The example I sent has at least 2 errors that need corrected. error 1- The "embed.test()" line should read "embed.useInterp()". error 2- the initialize arguments are wrong corrections noted below. sorry about that. On Tue, 21 Aug 2001, Robert W. Bill wrote: > > import java.util.Properties; > import org.python.util.PythonInterpreter; > > public class embeddingExample { > > protected PythonInterpreter interp; > > public static void main(String[] args) { > embeddingExample embed = new Embedding(); > embed.startInterp(); > // embed.test(); <-- ERROR embed.useInterp(); // <-- CORRECTION > } > > protected void startInterp() { > Properties props = new Properties(); > > if (System.getProperty("python.home") == null) > props.put("python.home", "/usr/local/jython"); //CORRECTED initialize method here PythonInterpreter.initialize(System.getProperties(), props, new String[0]); > interp = new PythonInterpreter(); > } > > public void useInterp() { > // define and call a Jython function > interp.exec("def test(message):\n" + > " print message"); > interp.exec("test('Hello world')"); > > // you can import Python modules as use them just as easily > interp.exec("import glob\n" + > "print glob.glob('*')"); > > } > } |
From: Robert W. B. <rb...@di...> - 2001-08-21 16:53:34
|
On Tue, 21 Aug 2001, Young-Jin Lee wrote: > Hi, all. > I have a question on the imbedded Jython. It seems like that a Java > application can use a Jython as an interpreter module, but I'm not sure > what kind of things can be done with the imbedded Jython. Anything you can do in Jython can be done with the embedded interpreter. > For example, > can a Java application call a user-defined Python method through a > Jython interpreter? Yes, with ease. > If it cannot be done, is there any other way to do > this? Using the embedded interpreter is best. > I need a Java interpreter module.... Here's an example... import java.util.Properties; import org.python.util.PythonInterpreter; public class embeddingExample { protected PythonInterpreter interp; public static void main(String[] args) { embeddingExample embed = new Embedding(); embed.startInterp(); embed.test(); } protected void startInterp() { Properties props = new Properties(); if (System.getProperty("python.home") == null) props.put("python.home", "/usr/local/jython"); PythonInterpreter.initialize(preProps, postProps, argv); interp = new PythonInterpreter(); } public void useInterp() { // define and call a Jython function interp.exec("def test(message):\n" + " print message"); interp.exec("test('Hello world')"); // you can import Python modules as use them just as easily interp.exec("import glob\n" + "print glob.glob('*')"); } } Enjoy, Robert |
From: Silvio A. <sar...@mo...> - 2001-08-21 16:08:40
|
Hello everybody, I have quite a weird problem and I don't know how to solve it. I'm using Jython to test the Java API of a CORBA platform. Some commands of this API are quite slow and they are run in background. Once they are terminated, the API returns the result of the operation passing a report to a callback object of the calling application. I tried implementing it in Jython: I defined a new Jython class that implements the callback interface, I registered it to get reports from the API, and then I called the API function...all working, except that my script then waits forever to be waken up by the ReportReceiver. I fancy that this is probably due to the fact that the API calls my callback object in a new JVM thread, that is maybe independent from the Jython interpreter...am I right? how can I make it work? bye, Silvio. |
From: Young-Jin L. <yl...@ui...> - 2001-08-21 15:58:15
|
Hi, all.=20 I have a question on the imbedded Jython. It seems like that a Java = application can use a Jython as an interpreter module, but I'm not sure = what kind of things can be done with the imbedded Jython. For example, = can a Java application call a user-defined Python method through a = Jython interpreter? If it cannot be done, is there any other way to do = this? I need a Java interpreter module.... Thanks in advance. Young-Jin Lee |