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: Frank I. <fra...@gm...> - 2001-09-17 16:41:00
|
Hello again, first, thanks for the hint about popen(I just missed the note in the README) Something else... Telnetlib is part of the jython standard lib. But telnetlib.py needs "select" which is no jython module. Python has a "select" extension which works for sockets only on NT .. Is there way to use telnet with jython on NT??? Thanks, Ciao Frank -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
From: Phil S. <psu...@es...> - 2001-09-17 13:51:30
|
Great tip Carlos! So, if you change to your jython home directory and create a lib.jar like this: >jar -cvf lib.jar Lib Then you can invoke jython like this: >java -cp jython.jar -Dpython.path=lib.jar!Lib org.python.util.jython and all your imports will work... To verify that the .py files are really coming from lib.jar and not from the $JYTHON_HOME/Lib directory, you might want to rename the Lib directory temporarily. Jython seems to be able to search for the Lib directory based on the location of jython.jar, though how it does this I do not know. -----Original Message----- From: Carlos Quiroz [mailto:car...@we...] Sent: Monday, September 17, 2001 3:55 AM To: jyt...@li... Subject: Re: [Jython-users] import from jar--clarification On Monday 17 September 2001 05:40, Antonio Rodriguez wrote: To do this you can bundle your py file into a subdir for the module, let say subdir util and filt util1, then it will be in the jar util.jar. You can add the jar to the sys.path by doing import sys sys.path.append("/path/to/jar/util.jar!util"); after this is possible to do from util import util1 You can also do this in java via PySystemState sys = Py.getSystemState(); sys.path.append(new PyString("/path/to/jar/util.jar!util")); Notice that this works only in jython 2.1a3 Therefore you can bundle all standard libraries in a lib.jar and do sys.path.append("/path/to/jar/lib.jar!Lib") Regards > Let me clarify: > > Im not asking how to put classes in the classpath. I'm asking how to put > all of the standard python library (the .py modules like re.py and > httplib.py) that compile to *$py.class into a jar in such a way that when a > PythonInterpreter runs over the line: import re, it can import the python > library from a jar. > > > Thanks. > > > -|dman <ds...@ri...> wrote on Sun Sep 16 20:56:03 EDT 2001: > > On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: > | How do I put a jar in the path of a PythonInterpreter object? > > $ java -help > Usage: java [-options] class [args...] > (to execute a class) > or java -jar [-options] jarfile [args...] > (to execute a jar file) > > where options include: > -client to select the "client" VM > -server to select the "server" VM > -classic to select the "classic" VM > If present, the option to select the VM must be first. > The default VM is -client. > > -cp -classpath <directories and zip/jar files separated by :> > set search path for application classes and resources > -D<name>=<value> > set a system property > -verbose[:class|gc|jni] > enable verbose output > -version print product version and exit > -showversion print product version and continue > -? -help print this help message > -X print help on non-standard options > > $ > > > The use -classpath option to the JVM you run jython with. > > HTH, > -D > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Phil S. <psu...@es...> - 2001-09-17 13:26:19
|
I've been wrestling with the same problem, just posted to jython-dev about it in fact. As far as I can tell, what you want to do is not supported but you can add support with the following patch to org/jython/core/imp.java in jython-2.1a3: imp.java 498a499,502 > //if it's not a builtin or in the python path, try the classpath > ret = loadFromClassLoader(name, imp.class.getClassLoader()); > if (ret != null) return ret; > Then you need to add the standard modules to the jython.jar file. I have an ant file that does this if you're interested. -----Original Message----- From: Antonio Rodriguez [mailto:An...@ho...] Sent: Sunday, September 16, 2001 10:40 PM To: jyt...@li...; ds...@ri... Subject: Re: [Jython-users] import from jar--clarification Let me clarify: Im not asking how to put classes in the classpath. I'm asking how to put all of the standard python library (the .py modules like re.py and httplib.py) that compile to *$py.class into a jar in such a way that when a PythonInterpreter runs over the line: import re, it can import the python library from a jar. Thanks. -|dman <ds...@ri...> wrote on Sun Sep 16 20:56:03 EDT 2001: On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: | How do I put a jar in the path of a PythonInterpreter object? $ java -help Usage: java [-options] class [args...] (to execute a class) or java -jar [-options] jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -classic to select the "classic" VM If present, the option to select the VM must be first. The default VM is -client. -cp -classpath <directories and zip/jar files separated by :> set search path for application classes and resources -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -showversion print product version and continue -? -help print this help message -X print help on non-standard options $ The use -classpath option to the JVM you run jython with. HTH, -D _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Phil S. <psu...@es...> - 2001-09-17 13:22:44
|
I just install jnios last night. The readme says=20 "fdopen() is now implemented and works. popen() is implemented but for = some reason it fails to run on Windows NT. Remarks from some people = (tim_one) who know Windows a lot better than I ever will, have led me to believe that = a functional popen() on Win32 should not be expected." ... so if you're using Windows, you're out of luck. -----Original Message----- From: Frank Immich [mailto:fra...@gm...] Sent: Monday, September 17, 2001 3:51 AM To: jyt...@li... Subject: [Jython-users] jnios/os.popen problem Hello,=20 I recently installed jnios for jython, to get the full os support.=20 When I run os.sysem("dir") in my jython shell everything is fine,=20 but os.popen("dir").read() does not work. I get the error message: "Es steht nicht genug Speicherplatz auf dem Datentr=E4ger zur = Verf=FCgung." which means something like: There is not enough space on your disk ? I think 9 GB should be enough for this command ;-) .. must be an other problem. Any help welcomed... Thanks, Ciao Frank --=20 GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Carlos Q. <car...@we...> - 2001-09-17 08:44:30
|
Hi, this module is very interesting. Finn, could you publish linux and/or= =20 solaris native libs. I'm trying to compile it for linux, with little suce= ss=20 :-( Regards > Hello, > I recently installed jnios for jython, to get the full os support. > When I run os.sysem("dir") in my jython shell everything is fine, > but os.popen("dir").read() does not work. I get the error message: > "Es steht nicht genug Speicherplatz auf dem Datentr=E4ger zur Verf=FCgu= ng." > which means something like: There is not enough space on your disk ? > I think 9 GB should be enough for this command ;-) .. must be an other > problem. > Any help welcomed... > Thanks, Ciao Frank |
From: Carlos Q. <car...@we...> - 2001-09-17 07:58:02
|
On Monday 17 September 2001 05:40, Antonio Rodriguez wrote: To do this you can bundle your py file into a subdir for the module, let say subdir util and filt util1, then it will be in the jar util.jar. You can add the jar to the sys.path by doing import sys sys.path.append("/path/to/jar/util.jar!util"); after this is possible to do from util import util1 You can also do this in java via PySystemState sys = Py.getSystemState(); sys.path.append(new PyString("/path/to/jar/util.jar!util")); Notice that this works only in jython 2.1a3 Therefore you can bundle all standard libraries in a lib.jar and do sys.path.append("/path/to/jar/lib.jar!Lib") Regards > Let me clarify: > > Im not asking how to put classes in the classpath. I'm asking how to put > all of the standard python library (the .py modules like re.py and > httplib.py) that compile to *$py.class into a jar in such a way that when a > PythonInterpreter runs over the line: import re, it can import the python > library from a jar. > > > Thanks. > > > -|dman <ds...@ri...> wrote on Sun Sep 16 20:56:03 EDT 2001: > > On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: > | How do I put a jar in the path of a PythonInterpreter object? > > $ java -help > Usage: java [-options] class [args...] > (to execute a class) > or java -jar [-options] jarfile [args...] > (to execute a jar file) > > where options include: > -client to select the "client" VM > -server to select the "server" VM > -classic to select the "classic" VM > If present, the option to select the VM must be first. > The default VM is -client. > > -cp -classpath <directories and zip/jar files separated by :> > set search path for application classes and resources > -D<name>=<value> > set a system property > -verbose[:class|gc|jni] > enable verbose output > -version print product version and exit > -showversion print product version and continue > -? -help print this help message > -X print help on non-standard options > > $ > > > The use -classpath option to the JVM you run jython with. > > HTH, > -D > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Frank I. <fra...@gm...> - 2001-09-17 07:51:24
|
Hello, I recently installed jnios for jython, to get the full os support. When I run os.sysem("dir") in my jython shell everything is fine, but os.popen("dir").read() does not work. I get the error message: "Es steht nicht genug Speicherplatz auf dem Datenträger zur Verfügung." which means something like: There is not enough space on your disk ? I think 9 GB should be enough for this command ;-) .. must be an other problem. Any help welcomed... Thanks, Ciao Frank -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net |
From: Greg J. <gj...@al...> - 2001-09-17 03:37:11
|
Hi, I've created a module "foo" which is defined in a file foo.py and which jython seems to automatically precompile into a file foo$py.class the first time I import it. What I'd like to do is put that .class file in a jar file and have jython import it from there, but listing the jar file in the python.path registry variable doesn't seem to work. Any ideas? Thanks, -Greg |
From: Antonio R. <An...@ho...> - 2001-09-17 02:47:24
|
Let me clarify: Im not asking how to put classes in the classpath. I'm asking how to put all of the standard python library (the .py modules like re.py and httplib.py) that compile to *$py.class into a jar in such a way that when a PythonInterpreter runs over the line: import re, it can import the python library from a jar. Thanks. -|dman <ds...@ri...> wrote on Sun Sep 16 20:56:03 EDT 2001: On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: | How do I put a jar in the path of a PythonInterpreter object? $ java -help Usage: java [-options] class [args...] (to execute a class) or java -jar [-options] jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -classic to select the "classic" VM If present, the option to select the VM must be first. The default VM is -client. -cp -classpath <directories and zip/jar files separated by :> set search path for application classes and resources -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -showversion print product version and continue -? -help print this help message -X print help on non-standard options $ The use -classpath option to the JVM you run jython with. HTH, -D _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: dman <ds...@ri...> - 2001-09-17 01:01:56
|
On Sun, Sep 16, 2001 at 05:11:10PM -0400, Antonio Rodriguez wrote: | How do I put a jar in the path of a PythonInterpreter object? $ java -help Usage: java [-options] class [args...] (to execute a class) or java -jar [-options] jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -classic to select the "classic" VM If present, the option to select the VM must be first. The default VM is -client. -cp -classpath <directories and zip/jar files separated by :> set search path for application classes and resources -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -showversion print product version and continue -? -help print this help message -X print help on non-standard options $ The use -classpath option to the JVM you run jython with. HTH, -D |
From: Antonio R. <An...@ho...> - 2001-09-16 21:18:23
|
How do I put a jar in the path of a PythonInterpreter object? |
From: John M. <joh...@ya...> - 2001-09-14 18:12:35
|
Check out http://sourceforge.net/projects/jnios/ utah: /home/mudd/jnios-1.7[1] jython Jython 2.1a1 on java1.3.0 (JIT: jitc) Type "copyright", "credits" or "license" for more information. >>> import jnios >>> dir(jnios) ['PosixFile', '__name__', 'errno', 'os', 'posix'] >>> from jnios import os >>> dir(os) ['F_OK', 'O_APPEND', 'O_CREAT', 'O_DSYNC', 'O_EXCL', 'O_NDELAY', 'O_NOCTTY', 'O_NONBLOCK', 'O_RDONLY', 'O_RDWR', 'O_RSYNC', 'O_SYNC', 'O_TRUNC', 'O_WRONLY', 'R_OK', 'UserDict', 'WEXITSTATUS', 'WIFEXITED', 'WIFSIGNALED', 'WIFSTOPPED', 'WNOHANG', 'WSTOPSIG', 'WTERMSIG', 'W_OK', 'X_OK', '_Environ', '_execvpe', '_exit', '_notfound', 'access', 'altsep', 'chdir', 'chmod', 'chown', 'close', 'curdir', 'defpath', 'dup', 'dup2', 'environ', 'error', 'execl', 'execle', 'execlp', 'execlpe', 'execv', 'execve', 'execvp', 'execvpe', 'fdatasync', 'fdopen', 'fork', 'fstat', 'fstatvfs', 'fsync', 'ftruncate', 'getLock', 'getcwd', 'getegid', 'geteuid', 'getgid', 'getpgrp', 'getpid', 'getppid', 'getuid', 'kill', 'linesep', 'link', 'listdir', 'lockf', 'lseek', 'lstat', 'makedirs', 'mkdir', 'mkfifo', 'name', 'nice', 'open', 'pardir', 'path', 'pathsep', 'pipe', 'popen', 'putenv', 'read', 'readlink', 'remove', 'removedirs', 'rename', 'renames', 'rmdir', 'sep', 'setLock', 'setgid', 'setpgid', 'setpgrp', 'setsid', 'setuid', 'stat', 'strerror', 'symlink', 'sys', 'system', 'tcgetpgrp', 'tcsetpgrp', 'times', 'ttyname', 'umask', 'uname', 'unlink', 'utime', 'wait', 'waitpid', 'write'] >>> os.system('ls') Makefile errno.dll mudd.tar.gz pyutil.h Makefile,v errno.o mytime.h pyutil.o Makefile.mvc jnios notes t.py PosixFile.cpp jnios.jar posix.cpp test.class PosixFile.o jnios_PosixFile.h posix.cpp,v test.java Readme_jnios.html jnios_errno.h posix.dll test.java,v apidoc jnios_posix.h posix.o testLock.py config.h jnios_posix.h,v posix.txt testLock.py,v cos$py.class junk4 posix.uuencode xxxx cos.py liberrno.so posixmodule.h xxxxx errno.cpp libposix.so pyutil.cpp 0 >>> utah: /home/mudd/jnios-1.7[1] --- Arne Wulvik <wu...@pr...> wrote: > Hi! > > Kind of a newbie question, but: > > I'd like to be able to start other processes, like shell scripts, on > the os (nt or unix) from a Jython script. I thought I could use > os.fork, or os.system but they are not available in the > java-dependent module used by os. Do I have to look for some java > classes that does the trick? > > Any suggestions? > > Arne > > > > __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ |
From: Jim A. <Ji...@do...> - 2001-09-14 16:13:57
|
Have you looked at Bruce Eckel's book 'Thinking in Patterns' Chapter 9 ? It it available online and has some good examples to get you started; the link is on jython.org or here: http://www.mindview.net/Books/TIPatterns/ > -----Original Message----- > From: Christoph Romann [mailto:rom...@zh...] > Sent: Friday, September 14, 2001 1:03 AM > To: jyt...@li... > Subject: [Jython-users] Embeding (J)Python in Java > > > Hello Guys > > I need some help in ebedding python into java. > does anyone has a better documentation on this topic as on jython.org > available? > > or are there more examples available? > > Thanx for your help. > > Chris > > > Content Security by MailMarshal > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Anthony E. <ae...@si...> - 2001-09-14 14:29:51
|
Rather than embedding Jython directly I would suggest looking at IBM's Bean Scripting Framework: http://oss.software.ibm.com/developerworks/projects/bsf Using this framework will allow you to support more than just Python within your Java applications and it includes a sufficient amount of documentation. Sincerely, Anthony Eden -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Christoph Romann Sent: Friday, September 14, 2001 5:03 AM To: jyt...@li... Subject: [Jython-users] Embeding (J)Python in Java Hello Guys I need some help in ebedding python into java. does anyone has a better documentation on this topic as on jython.org available? or are there more examples available? Thanx for your help. Chris Content Security by MailMarshal _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Humbel O. <Otm...@bi...> - 2001-09-14 11:59:05
|
[ Samuele Pedroni ] > The idea of the patch is fine for me, on the other hand > it needs some work to better integrate with the rest > of the import logic. >=20 > In any case I would like to understand why so often > jars are reported as bad, this should be quite rare... >=20 > I think we should dig into that. Please let me try to describe the problem we have with our jar file. First at all, I think it is not a Jython issue. If java.util.Locale.getAvailableLocales() is called with this jar file in the classpath, we get: 'file IO Exception:java.util.zip.ZipException: invalid EXT descriptor signature' How do we create the jar file ? We start with a valid jar file named external.jar, which contains all the classes from packages we don't have the source code. external.jar for example contains: com.sun.mail javax.infobus oracle.jdbc etc. Each night we make our application, resulting in packages CH.obj.XYZ. Then we add these classes into a copy of external.jar (named bisonInfra.jar), and the result has the invalid EXT descriptor signature. We have tried every version of PKZIP and many different combination of classes in external.jar, always with the same result. Funny enough, the invalid EXT descriptor always occurs in the same package/class. I tend to blame PKZIP for that (but its only a guess), because if we do it manually (either with jar or WinZip): - unpack all directories from external.jar - adjust the upper/lower case of some directories (greetings from Windows) - pack the whole directory tree into an empty jar file the resulting jar is valid.=20 We simply can't do it right automatically. We test our classpath with the following script (snippet): # # scan the whole class path for .jar's and .zip's #=20 def testJarsOnClasspath( self ): # split the classpath into entries pathSep =3D System.getProperty( "path.separator" ) classpath =3D System.getProperty("java.class.path") pathEntries =3D string.split( classpath, pathSep ) # prepare the error dictionary self._errors =3D {} # test the files on classpath for pathEntry in pathEntries: suffix =3D pathEntry[-4:] if suffix =3D=3D ".jar" or suffix =3D=3D ".zip": self.__checkJarFile( pathEntry ) # report the errors if self._errors: message =3D "The following jar (or zip) files have errors: = \n" for jarFile in self._errors.keys(): message =3D "%s *** %s *** (in %s) \n" % (message, self._errors[jarFile], jarFile ) print message # # check a single jar file and add errors to self._errors #=20 def __checkJarFile( self, jarFilePath ): print "checking %s" % jarFilePath zipFile =3D ZipInputStream( FileInputStream( File(jarFilePath) ) ); try: entry =3D zipFile.getNextEntry() while entry !=3D None: if self._debug: print entry.getName() entry =3D zipFile.getNextEntry() except ZipException, ze: if self._debug: ze.printStackTrace() self._errors[ jarFilePath] =3D ze.getMessage() Best wishes, Oti. |
From: Kevin M. <kev...@er...> - 2001-09-14 09:16:24
|
Thanks for all the tips! I feel very eco-friendly reusing my objects. /Kevin On Wed, 12 Sep 2001, Ype Kingma wrote: > >Hi, > > > >why does the following not work: > > > >a = [1, 2] > >for i in a: > > a.remove(i) > > > > > >The loop exits after the first iteration leaving a = [2] > > > >How do I get around this problem? > > Iterating over a list that is being modified results > in undefined behaviour. A better way is: > > for i in a[:]: # iterate over a copy > a.remove(i) # remove from original > > The problem with this is that it still needs to access each element > in the list (at least twice). > > When you need to remove some of the elements in a list you could > also use list comprehensions, but these always create a new list: > > a = [i for i in a if not someRemoveCondition(i)] > > > To empty a list in a single operation you can also: > > a[:] = [] # modify in place to become an empty list. (A) > > or > > a = [] # change to refer to a new empty list object. (B) > > or, preferably: > > del a[:] # modify in place deleting all entries (C) > > The last variant does not create a new object, which can make a measurable > difference for garbage collection in case it avoids creating a lot of them. > This technique is also known as reusing existing objects. > I have never measured the difference between (A) and the other > two, but (C) is definitely faster than (B) in Jython. > It is probably faster in CPython, too. > > > > >Any help appreciated, > >Kevin > > My pleasure, > Ype > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Arne W. <wu...@pr...> - 2001-09-14 09:16:04
|
Hi! I found that most of what I wanted to achieve with the embedding, at least at this stage, was quite easily done by looking at the PythonInterpreter class and experimenting with that. However, I too would like to see some better documentation and examples. So far I haven't found anything more useful than the documents at jython.org Arne ----- Original Message ----- From: "Christoph Romann" <rom...@zh...> To: <jyt...@li...> Sent: Friday, September 14, 2001 11:02 AM Subject: [Jython-users] Embeding (J)Python in Java > Hello Guys > > I need some help in ebedding python into java. > does anyone has a better documentation on this topic as on jython.org > available? > > or are there more examples available? > > Thanx for your help. > > Chris > > > Content Security by MailMarshal > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Christoph R. <rom...@zh...> - 2001-09-14 09:00:45
|
Hello Guys I need some help in ebedding python into java. does anyone has a better documentation on this topic as on jython.org available? or are there more examples available? Thanx for your help. Chris Content Security by MailMarshal |
From: Christoph R. <rom...@zh...> - 2001-09-14 07:25:44
|
Hello it seems to me as there is a class file missing. i had also error messages like this (no code in line 0). As i browsed through the code, i noticed, several java files were not compiled. So i got this not very meaniful error messages. since i compiled the whole stuff, every thing works fine. I didn't see misspelled code, but my strenght is Java and not python so i can't guarantee this. Which version of Jython are you running? I'm using 2.0 and there i get serveral error messages out of the python code, before my *.py files are involved. Greets Chris ps: i'm reesusing python modules in a J2EE environment Content Security by MailMarshal |
From: C. P. B. <cpo...@ho...> - 2001-09-14 05:09:33
|
I don't know how to get a multi-file program byte-compiled properly. I wrote two simple files - one has a base class, and the other one imports that module, and defines another class that inherits from that first class. Here they are: base.py: class main: def funcMain(self): print "main func" sub.py: import base class sub(base.main): def funcSub(self): print "sub func" if __name__=="__main__": a = sub() a.funcMain() a.funcSub() Running sub.py works just fine in cpython and jython. When I run jythonc it compiles. In the current directory, it creates a file called base$py.class. It also creates a jpywork/ directory which contains the files sub$_PyInner.class, sub.class, and sub.java. When I try to run java sub from the jpywork/ directory, I get this error: java sub Java Traceback: at org.python.core.Py.ImportError(Py.java:180) at org.python.core.imp.load(imp.java:368) at org.python.core.imp.load(imp.java:376) at org.python.core.imp.importName(imp.java:447) at org.python.core.imp.importName(imp.java:509) at org.python.core.ImportFunction.load(__builtin__.java:967) at org.python.core.ImportFunction.__call__(__builtin__.java:961) at org.python.core.PyObject.__call__(PyObject.java:250) at org.python.core.__builtin__.__import__(__builtin__.java:921) at org.python.core.imp.importOne(imp.java:518) at sub$_PyInner.main$3(sub.java:56) at sub$_PyInner.call_function(sub.java:38) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.Py.runMain(Py.java:798) at sub.main(sub.java:76) Traceback (innermost last): File "D:\junk\sub.py", line 0, in main ImportError: no module named base I also tried compiling base.py separately, but still no dice. What am I doing wrong? -------------------------------------------------------------------------- C. Porter Bassett cporter at byu dot edu www.et.byu.edu/~porter odigo #: 3854128 ICQ #:38435505 AIM ID: cporterbassett -------------------------------------------------------------------------- "Pretend like this is a really witty saying." - Anonymous -------------------------------------------------------------------------- |
From: Kevin B. <kb...@ca...> - 2001-09-13 14:46:50
|
Stefan Farestam wrote: > > Suppose that I create a class A that is a subclass of a Java class. > How can I convert instances of the baseclass to instances of the > subclass? Usually, the desire to convert instances of a base class into instances of a subclass indicates a design flaw. That said, when it is needed, you create a constructor of the subclass that takes the base class instance and constructs a new instance that either wraps the base class instance or copies its data (a copy constructor). kb |
From: Humbel O. <Otm...@bi...> - 2001-09-13 14:35:49
|
[ Finn Bock ] > I agree again. I hope you at least understand why importing java > packages fails. Yes, of course. The 'what java can load' was meant for single java classes. > Please add this as a patch to the SF patch manager. That way=20 > we will not forget it. I hope patch #461151 is what you meant and need. > Of the top of my head, I kinda like it. It a pragmatic solution to a > huge problem which we (I fear) will never resolve perfectly. Pleased to hear that - thank you very much! May I ask a follow up:=20 When I use Jython as an embedded scripting language, the package manager will not scan the .jar files, I assume ? If so, there normally is the need for sys.add_package() in embedded scripts.=20 The suggested patch eliminates this need if java classes are imported explicitly ? Best wishes, Oti. |
From: Christoph R. <rom...@zh...> - 2001-09-13 11:12:42
|
Hi all thanx a lot for your help, kevin. i analyzed the code so far and their are no zope specialytiesintegrated. The C parts are also no Problem. But when i now use the jythonc tool from, i don't work properly. it stopps work before parsing begins. This is the error message: C:\DA_Comit\src\python>jythonc --deep --workdir C:\DA_Comit\src BlackScholes.py processing BlackScholes Traceback (innermost last): File "C:\Program Files\jython-21a3\Tools\jythonc\jythonc.py", line 5, in ? File "C:\Program Files\jython-21a3\Tools\jythonc\main.py", line 300, in main File "C:\Program Files\jython-21a3\Tools\jythonc\main.py", line 219, in doCompile File "C:\Program Files\jython-21a3\Tools\jythonc\compile.py", line 195, in compilefile File "C:\Program Files\jython-21a3\Tools\jythonc\compile.py", line 209, in compile File "C:\Program Files\jython-21a3\Tools\jythonc\BaseEvaluator.py", line 310, in execstring File "<string>", line 102 SyntaxError: invalid syntax I don't know what i should do next. May I have to replce the C extensions before i use jythonc? I'm looking to here from you. Greets Chris Content Security by MailMarshal |
From: Stefan F. <st...@ti...> - 2001-09-13 08:41:00
|
Suppose that I create a class A that is a subclass of a Java class. How can I convert instances of the baseclass to instances of the subclass? Thanks, Stefan |
From: C. P. B. <cpo...@ho...> - 2001-09-13 04:13:00
|
I am trying to write a class in jython that inherits from a java class and will be used in a java program. (See my earlier message about robocode). Some people have suggested that I haven't declared my class to be in a package? I don't really understand how packages work in java, but in jython how do I set a class to be part of a package? -------------------------------------------------------------------------- C. Porter Bassett cporter at byu dot edu www.et.byu.edu/~porter odigo #: 3854128 ICQ #:38435505 AIM ID: cporterbassett -------------------------------------------------------------------------- "Pretend like this is a really witty saying." - Anonymous -------------------------------------------------------------------------- |