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: Ype K. <yk...@xs...> - 2001-05-09 19:54:53
|
Adam, (posted after mistakingly sending to Adam only) You wrote: >Well, I've been playing with Jython a bit, and I still >don't fully understand it. I'm even sad to say that I >find the javadoc sadly lacking. I'm hoping, then, that >some more knowledgable person can take pity on me and >give me a hand. I'm going to describe what I want to >do, in as much detail as I can think of, and I'm >hoping someone can explain how to do it. I wrote an environment for jython modules in jython itself, so I can only partially answer you questions. The answer is a bit long, but so was your post... > >I have a class written in Java with a few methods >defined. I want the user of my program to be able to >extend this class in Jython by writing a .py file with >a >known name. Then, when a certain event occurs in my >program, I wish to load this class (including >reloading it, if it has changed since the last time we >used it), instantiate it, and call a method with a >known name/signature (that is, one of the methods >defined in the parent class). In addition, since there Using an PythonInterpreter, you can do an execfile on a jython module. This has basically the same effect as using the module as the main program in a jython run. The interpreter will load java equivalent classes of all the classes defined in the module. I'm afraid you are going to have to write your own class loader and/or your own PythonInterpreter if you want to restrict class loading. >will be multiple python files floating around (that >is, the user can define more than one class in python, >although they all will extend the same java base >class), I want >to make sure there are no side effects; that is, I >don't want definitions and such to hang around between >calls to python classes. You can remove modules from sys.modules using del. To remove java classes have a look at the jreload docs on jython.sourceforge.org. > >How should I even begin to do this? I don't know >whether it is better to compile or interpret, in this >case, even. Speed is actually a relatively important >factor, which is a point for compiling, but only if >there's a way to recompile and reload classes without >restarting the VM (preferably a prettier way than the >usual hack for doing this in java). On the other hand, >while interpreting seems easier at first, I can't find >a way to enforce the contract that the .py file >contain only a class, and nothing else. Also, unless Have a look at linecache.py on how to check for changed modules. I don't think you need to worry about speed: jython is always compiled before being run/interpreted. Creating an interpreter from within the jython environment is quite fast: only the locals and globals to start off the interpreter must be provided in a basic setup, all the code is already available. To constrain a .py file to a single class you'll have to write your own interpreter, see the python docs on what constitutes a correct python program: any nr. of class definitions, function definitions and statements is allowable at module level. >we create a new interpreter each >time (which may, I wouldn't be surprised, take longer >than just recompiling a class), I don't see a way to >guarantee no side effects between calls. In general there is no such guarantee: only the module that is mentioned in execfile is dropped from the sys namespace, all it's imported modules are kept, although you can delete those. Having imported modules kept around is not only a disadvantage: it also speeds up later executions. > >Whatever help or advice you can give would be >appreciated. The more low-level (pseudocode, example >code, whatever) the better. I'm 95% sure that what I'm >asking for is possible, and 100% sure it should be >possible, so if I find out that it's not, for whatever >reason, I do intend to hack Jython until it is. If I >end up >doing this, I really will need all the detail I can >get, before I try to grok the code on my own. I can recommend trying to do it in jython first. Experimenting is a faster in jython than in java. Basically this boils down to writing a main program in jython, calling your java code from this while passing to the java code some jython objects, possibly subclasses of your java classes or implementations of java interfaces. One of these jython objects can then do the work: use execfile(), and evt. adapt sys.modules and sys.argv around the execfile call. Some thoughts: You'll probably need to setup a directory from which to load the user modules. Also you might(?) need to catch exceptions thrown from user code. In case your user code uses swing, you also get multiple threads. How will users debug their code? Where does print output go? At some point you may decide that you need to subclass your python classes in java code, I never got that far. To start off, it will help you a lot if you trust your users to put only your expected class in a module. After all, you have already accepted that you are going to call user code and you can control the moment the user module is going to be executed. Allowing your users a normal jython module will save you the work of adapting the jython interpreter. In case you need more isolation you might have to fall back on java security features like class loaders and security checks. I saw a basic howto for this on one of the jython lists recently. In case you want to have a look at some jython code calling execfile and unloading (sys.)modules, let me know. Good luck and have fun, Ype |
From: Adam B. <sir...@ya...> - 2001-05-08 18:11:18
|
Well, I've been playing with Jython a bit, and I still don't fully understand it. I'm even sad to say that I find the javadoc sadly lacking. I'm hoping, then, that some more knowledgable person can take pity on me and give me a hand. I'm going to describe what I want to do, in as much detail as I can think of, and I'm hoping someone can explain how to do it. I have a class written in Java with a few methods defined. I want the user of my program to be able to extend this class in Jython by writing a .py file with a known name. Then, when a certain event occurs in my program, I wish to load this class (including reloading it, if it has changed since the last time we used it), instantiate it, and call a method with a known name/signature (that is, one of the methods defined in the parent class). In addition, since there will be multiple python files floating around (that is, the user can define more than one class in python, although they all will extend the same java base class), I want to make sure there are no side effects; that is, I don't want definitions and such to hang around between calls to python classes. How should I even begin to do this? I don't know whether it is better to compile or interpret, in this case, even. Speed is actually a relatively important factor, which is a point for compiling, but only if there's a way to recompile and reload classes without restarting the VM (preferably a prettier way than the usual hack for doing this in java). On the other hand, while interpreting seems easier at first, I can't find a way to enforce the contract that the .py file contain only a class, and nothing else. Also, unless we create a new interpreter each time (which may, I wouldn't be surprised, take longer than just recompiling a class), I don't see a way to guarantee no side effects between calls. Whatever help or advice you can give would be appreciated. The more low-level (pseudocode, example code, whatever) the better. I'm 95% sure that what I'm asking for is possible, and 100% sure it should be possible, so if I find out that it's not, for whatever reason, I do intend to hack Jython until it is. If I end up doing this, I really will need all the detail I can get, before I try to grok the code on my own. Adam Berger __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: John M. <joh...@ya...> - 2001-05-08 12:18:09
|
I've tried Finn's package under UNIX. I was impressed! The only mystery is why he doesn't promote it more. --- brian zimmer <bz...@zi...> wrote: > It's not implemented in Jython because the JVM does not provide > access to the environment. You'd have to write JNI code to get such > a facility (I think Finn wrote such a module once). The closest you > get is System.getProperties(), which is not really the same thing. > > brian > > At 10:47 AM 5/7/2001 -0700, Daniel Lord wrote: > >I tried with both Jython 2.0 and Jython 2.1a1, and I get the > following: > > > >Jython 2.1a1 on java1.3.0 (JIT: null) > >Type "copyright", "credits" or "license" for more information. > >>>> import os > >>>> os.environ['path'] > >Traceback (innermost last): > > File "<console>", line 1, in ? > >KeyError: path > > > >Then just to check: > > > >>>> os.environ > >{} > >>>> > > > >Is it unimplemented or is my installation corrupt or incomplete? > > > >Here is how Python 2.1 that installed from source works: > >Python 2.1 (#1, 04/28/01, 16:09:19) > >[GCC Apple DevKit-based CPP 6.0alpha] on darwin1 > >Type "copyright", "credits" or "license" for more information. > >>>> import os > >>>> os.environ['PATH'] > >'~/bin/powerpc-apple-macos:/Users/daniello/bin:/usr/local/bin:/usr/bin:/bin: > >/usr/local/sbin:/usr/sbin:/sbin:.' > >>>> os.environ > >{'JAVA_HOME': '/Library/Java/Home', 'OSTYPE': 'macos', 'MANPATH': > >'~/man:/usr/local/share/man:/usr/share/man', > 'DL_ENVIRONMENT_MINE_SET': '1', > >'TERM_PROGRAM_VERSION': '41', '__CF_USER_TEXT_ENCODING': > '0x1F5:0:0', > >'PATH': > >'~/bin/powerpc-apple-macos:/Users/daniello/bin:/usr/local/bin:/usr/bin:/bin: > >/usr/local/sbin:/usr/sbin:/sbin:.', 'VENDOR': 'apple', 'SHLVL': '1', > >'ANT_HOME': '/opt/ant', 'PWD': '/opt/jython/Doc', 'SHELL': > '/bin/tcsh', > >'TERM': 'vt100', 'TERMCAP': 'd0|vt100|vt100-am|vt100am|dec > >vt100:\t:do=^J:co#100:li#40:cl=\\E[;H\\E[2J:sf=2*\\ED:\t:le=^H:bs:am:cm=5\\E > >[%i%d;%dH:nd=2\\E[C:up=2\\E[A:\t:ce=3\\E[K:cd=50\\E[J:so=2\\E[7m:se=2\\E[m:u > >s=2\\E[4m:ue=2\\E[m:\t:md=2\\E[1m:mr=2\\E[7m:mb=2\\E[5m:me=2\\E[m:\t:rf=/usr > >/share/tabset/vt100:\t:rs=\\E>\\E[?3l\\E[?4l\\E[?5l\\E[?7h\\E[?8h\\E[;r\\E[0 > >m\\E(B\\E)B\\E[2J:\t:ks=\\E[?1h\\E=:ke=\\E[?1l\\E>:\t:ku=\\EOA:kd=\\EOB:kr=\ > >\EOC:kl=\\EOD:kb=^H:\t:ho=\\E[H:k1=\\EOP:k2=\\EOQ:k3=\\EOR:k4=\\EOS:pt:sr=2* > >\\EM:vt#3:xn:\t:sc=\\E7:rc=\\E8:cs=\\E[%i%d;%dr:', 'LANG': 'en_US', > >'TERM_PROGRAM': 'Apple_Terminal', 'DL_RC_SET': '1', 'HOME': > >'/Users/daniello', 'USER': 'daniello', 'LOGNAME': 'daniello', > 'HOST': > >'localhost', 'DL_PATH_SET': '1', 'HOSTTYPE': 'macintosh', > 'CLASSPATH': > >'/opt/xerces/xerces.jar:/opt/apachexml/bsf.jar:/opt/apachexml/bsfengines.jar > >:/opt/apachexml/smtp.jar:/opt/apachexml/pop3.jar:/opt/apachexml/xmisoap.jar: > >/opt/jdom/lib/collections.jar:/opt/saxon/saxon.jar:/opt/saxon/saxon-fop.jar' > >, 'ENV_SET': '', 'MACHTYPE': 'powerpc', 'GROUP': 'staff'} > >>>> > > > >My environment: > > > >Mac OS X 10.0.2 with 512 MB > >java version "1.3.0" > >Java(TM) 2 Runtime Environment, Standard Edition (build 1.3) > >Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) > > > > > > > >_______________________________________________ > >Jython-users mailing list > >Jyt...@li... > >http://lists.sourceforge.net/lists/listinfo/jython-users > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: brian z. <bz...@zi...> - 2001-05-07 18:40:57
|
It's not implemented in Jython because the JVM does not provide access to the environment. You'd have to write JNI code to get such a facility (I think Finn wrote such a module once). The closest you get is System.getProperties(), which is not really the same thing. brian At 10:47 AM 5/7/2001 -0700, Daniel Lord wrote: >I tried with both Jython 2.0 and Jython 2.1a1, and I get the following: > >Jython 2.1a1 on java1.3.0 (JIT: null) >Type "copyright", "credits" or "license" for more information. >>>> import os >>>> os.environ['path'] >Traceback (innermost last): > File "<console>", line 1, in ? >KeyError: path > >Then just to check: > >>>> os.environ >{} >>>> > >Is it unimplemented or is my installation corrupt or incomplete? > >Here is how Python 2.1 that installed from source works: >Python 2.1 (#1, 04/28/01, 16:09:19) >[GCC Apple DevKit-based CPP 6.0alpha] on darwin1 >Type "copyright", "credits" or "license" for more information. >>>> import os >>>> os.environ['PATH'] >'~/bin/powerpc-apple-macos:/Users/daniello/bin:/usr/local/bin:/usr/bin:/bin: >/usr/local/sbin:/usr/sbin:/sbin:.' >>>> os.environ >{'JAVA_HOME': '/Library/Java/Home', 'OSTYPE': 'macos', 'MANPATH': >'~/man:/usr/local/share/man:/usr/share/man', 'DL_ENVIRONMENT_MINE_SET': '1', >'TERM_PROGRAM_VERSION': '41', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', >'PATH': >'~/bin/powerpc-apple-macos:/Users/daniello/bin:/usr/local/bin:/usr/bin:/bin: >/usr/local/sbin:/usr/sbin:/sbin:.', 'VENDOR': 'apple', 'SHLVL': '1', >'ANT_HOME': '/opt/ant', 'PWD': '/opt/jython/Doc', 'SHELL': '/bin/tcsh', >'TERM': 'vt100', 'TERMCAP': 'd0|vt100|vt100-am|vt100am|dec >vt100:\t:do=^J:co#100:li#40:cl=\\E[;H\\E[2J:sf=2*\\ED:\t:le=^H:bs:am:cm=5\\E >[%i%d;%dH:nd=2\\E[C:up=2\\E[A:\t:ce=3\\E[K:cd=50\\E[J:so=2\\E[7m:se=2\\E[m:u >s=2\\E[4m:ue=2\\E[m:\t:md=2\\E[1m:mr=2\\E[7m:mb=2\\E[5m:me=2\\E[m:\t:rf=/usr >/share/tabset/vt100:\t:rs=\\E>\\E[?3l\\E[?4l\\E[?5l\\E[?7h\\E[?8h\\E[;r\\E[0 >m\\E(B\\E)B\\E[2J:\t:ks=\\E[?1h\\E=:ke=\\E[?1l\\E>:\t:ku=\\EOA:kd=\\EOB:kr=\ >\EOC:kl=\\EOD:kb=^H:\t:ho=\\E[H:k1=\\EOP:k2=\\EOQ:k3=\\EOR:k4=\\EOS:pt:sr=2* >\\EM:vt#3:xn:\t:sc=\\E7:rc=\\E8:cs=\\E[%i%d;%dr:', 'LANG': 'en_US', >'TERM_PROGRAM': 'Apple_Terminal', 'DL_RC_SET': '1', 'HOME': >'/Users/daniello', 'USER': 'daniello', 'LOGNAME': 'daniello', 'HOST': >'localhost', 'DL_PATH_SET': '1', 'HOSTTYPE': 'macintosh', 'CLASSPATH': >'/opt/xerces/xerces.jar:/opt/apachexml/bsf.jar:/opt/apachexml/bsfengines.jar >:/opt/apachexml/smtp.jar:/opt/apachexml/pop3.jar:/opt/apachexml/xmisoap.jar: >/opt/jdom/lib/collections.jar:/opt/saxon/saxon.jar:/opt/saxon/saxon-fop.jar' >, 'ENV_SET': '', 'MACHTYPE': 'powerpc', 'GROUP': 'staff'} >>>> > >My environment: > >Mac OS X 10.0.2 with 512 MB >java version "1.3.0" >Java(TM) 2 Runtime Environment, Standard Edition (build 1.3) >Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) > > > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Daniel L. <da...@br...> - 2001-05-07 17:48:34
|
I tried with both Jython 2.0 and Jython 2.1a1, and I get the following: Jython 2.1a1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['path'] Traceback (innermost last): File "<console>", line 1, in ? KeyError: path Then just to check: >>> os.environ {} >>> Is it unimplemented or is my installation corrupt or incomplete? Here is how Python 2.1 that installed from source works: Python 2.1 (#1, 04/28/01, 16:09:19) [GCC Apple DevKit-based CPP 6.0alpha] on darwin1 Type "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['PATH'] '~/bin/powerpc-apple-macos:/Users/daniello/bin:/usr/local/bin:/usr/bin:/bin: /usr/local/sbin:/usr/sbin:/sbin:.' >>> os.environ {'JAVA_HOME': '/Library/Java/Home', 'OSTYPE': 'macos', 'MANPATH': '~/man:/usr/local/share/man:/usr/share/man', 'DL_ENVIRONMENT_MINE_SET': '1', 'TERM_PROGRAM_VERSION': '41', '__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'PATH': '~/bin/powerpc-apple-macos:/Users/daniello/bin:/usr/local/bin:/usr/bin:/bin: /usr/local/sbin:/usr/sbin:/sbin:.', 'VENDOR': 'apple', 'SHLVL': '1', 'ANT_HOME': '/opt/ant', 'PWD': '/opt/jython/Doc', 'SHELL': '/bin/tcsh', 'TERM': 'vt100', 'TERMCAP': 'd0|vt100|vt100-am|vt100am|dec vt100:\t:do=^J:co#100:li#40:cl=\\E[;H\\E[2J:sf=2*\\ED:\t:le=^H:bs:am:cm=5\\E [%i%d;%dH:nd=2\\E[C:up=2\\E[A:\t:ce=3\\E[K:cd=50\\E[J:so=2\\E[7m:se=2\\E[m:u s=2\\E[4m:ue=2\\E[m:\t:md=2\\E[1m:mr=2\\E[7m:mb=2\\E[5m:me=2\\E[m:\t:rf=/usr /share/tabset/vt100:\t:rs=\\E>\\E[?3l\\E[?4l\\E[?5l\\E[?7h\\E[?8h\\E[;r\\E[0 m\\E(B\\E)B\\E[2J:\t:ks=\\E[?1h\\E=:ke=\\E[?1l\\E>:\t:ku=\\EOA:kd=\\EOB:kr=\ \EOC:kl=\\EOD:kb=^H:\t:ho=\\E[H:k1=\\EOP:k2=\\EOQ:k3=\\EOR:k4=\\EOS:pt:sr=2* \\EM:vt#3:xn:\t:sc=\\E7:rc=\\E8:cs=\\E[%i%d;%dr:', 'LANG': 'en_US', 'TERM_PROGRAM': 'Apple_Terminal', 'DL_RC_SET': '1', 'HOME': '/Users/daniello', 'USER': 'daniello', 'LOGNAME': 'daniello', 'HOST': 'localhost', 'DL_PATH_SET': '1', 'HOSTTYPE': 'macintosh', 'CLASSPATH': '/opt/xerces/xerces.jar:/opt/apachexml/bsf.jar:/opt/apachexml/bsfengines.jar :/opt/apachexml/smtp.jar:/opt/apachexml/pop3.jar:/opt/apachexml/xmisoap.jar: /opt/jdom/lib/collections.jar:/opt/saxon/saxon.jar:/opt/saxon/saxon-fop.jar' , 'ENV_SET': '', 'MACHTYPE': 'powerpc', 'GROUP': 'staff'} >>> My environment: Mac OS X 10.0.2 with 512 MB java version "1.3.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3) Java HotSpot(TM) Client VM (build 1.3.0, mixed mode) |
From: Peter B. <bri...@ma...> - 2001-05-07 04:56:59
|
Hi! I'd like to announce Gumbie, an automatic GUI generator for Jython. You can find Gumbie at http://www.math.uiuc.edu/~brinkman/software/gumbie/ I'll attach a short note that discusses the package, and I'd be thrilled to hear any questions or comments you might have. Best, Peter |
From: <bc...@wo...> - 2001-05-04 19:54:57
|
[Robert W. Bill] >Hello all, > >Just a quick Q... > >Should *.jar and *.zip files that are in sys.path but not in >classpath be loadable? If so, how is this done? There is no support for this in the current codebase. Adding simple support is rather easy. Adding fast loading is very difficult. We have to keep the .zip files open in order to make the loading fast and since the sys.path can be changed dynamicly it is difficult to close the zip file in an orderly fashion. Despite the problems, we all agree that loading from .jar & .zip on sys.path is so natural that it should be supported. regards, finn |
From: Robert W. B. <rb...@di...> - 2001-05-04 19:07:49
|
Hello all, Just a quick Q... Should *.jar and *.zip files that are in sys.path but not in classpath be loadable? If so, how is this done? Thanks. cheers, Robert |
From: <bc...@wo...> - 2001-05-04 18:09:08
|
[Kenny] >Hi All. > >I would like to make the following two lines of Java code work with >Python classes: > > fromJavaClass = >Class.forName("PythonClassSubclassedFromJavaClass"); > fromJava = fromJavaClass.newInstance(); > >Unfortunately, this does not work as I would expect it to. Some >experimentation shows that Python classes show up in Java something like > >org.python.proxies.PythonClassSubclassedFromJavaClass$PythonClassSubclassedFromJavaClass$0 > >which is not that useful. > >Is there any way I can affect the Java class name of the Python class? No. Sorry. regards, finn |
From: Ryan S. <FL...@FD...> - 2001-05-03 21:22:57
|
Have you checked out the JACOB project. I haven't done much with it yet, but I've been able to run some of the samples (such as opening and manipulating Excel). Just make sure you download the source and recompile if you want it to work correctly on SDK 1.3. http://users.rcn.com/danadler/jacob/ -Ryan "Neil Benn" <neil.benn@cambridgeantibody.c To: <jyt...@li...> om> cc: Sent by: Subject: [Jython-users] JPE jyt...@li...urc eforge.net 05/02/01 09:54 AM Please respond to neil.benn Hello, I've been looking at running Pyhton scripts from JAVA and initally started looking at Jython. However Jython runs in the JVM and therefore I'm losing out on the ability to call out to other systems (most specifically ActiveX). I've seen and Java-Python bridge called JPE from Arkane software - the question is - has anybody got any experiences with it good or bad? All/any help appreciated. Cheers, Neil Benn Automation Informatics Scientist CaT _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: <Ron...@Ne...> - 2001-05-03 17:31:17
|
I have the following situation, which strikes me as bizarre: file Ab.py: --------------- class AB : def handleCommand (self, cmd) : print "AB.handleCommand()" file fred.py: ---------------- from AB import AB class fred (AB) : def handleCommand (self, cmd) : print "fred.handleCommand()" file C.py: from AB import AB from fred import fred class C (fred) : def handleCommand (self, cmd) : if blahBlah : <<========= is false fred.handleCommand(self, cmd) else : AB.handleCommand(self, cmd) Ok. Everything has been running fine for "months"; I see "AB.handleCommand()" in the output, just as is desired. Today I just happened to notice that module AB was used in the import statements and not module Ab. I'm a freak about details, so I changed the imports to say module Ab and not AB. Now the code breaks with a traceback saying: "TypeError: unbound method must be called with class instance 1st argument" I changed the imports back to say module AB, and all works again. What is happening - my brain feels like it's leaking. |
From: Ben H. <Ben...@fi...> - 2001-05-03 08:41:48
|
This is totally what the Java 2 Security model aims to provide. When access control is enabled, any prohibited operation will fail with a SecurityException. A mini-howto (for Java 2): You must have a security manager installed. The default one will do fine. use: -Djava.security.manager on the command line System.setSecurityManager(new SecurityManager()); from within code The security policy is defined in java.policy in jre/lib/security. It consists of grant clauses, each which has a codebase location, and the set of permissions granted to code loaded from the place. You need to add 2 new grant clauses. One for the python interpreter, ie jython.jar, allowing the operations for scripts. And one for your normal trusted code, ie your app, allowing full permissions, (I guess). The reason this second one is now required is that a SecutiryManager is installed. Details of policy filew sysntax and available permisisons is in the Java Security Architecture doc, bundled with the 1.3 Java Docs Good luck, Ben ----- Original Message ----- From: "Adam Berger" <sir...@ya...> To: <jyt...@li...> Sent: Wednesday, May 02, 2001 7:18 AM Subject: Re: [Jython-users] restricting java classes access in jython > On a related note, is there any way to take advantage > of the java security system to make (untrusted) python > code run in an environment similar to that given to > applets? That is, no access to the disk drive, etc. > I'm sure I'm not the only one using jython as an > unrtusted extension language... having security > guarantees would be magnifique. > > Adam > > --- Tait Larson <ta...@we...> wrote: > > I'm experimenting with building a jython interpreter > > into our java > > platform. The our java platform implements the > > business logic of a web > > application. > > > > I'd like to restrict the jython interpreter so that > > it can only > > directly access specific classes currently available > > in the running > > jvm. I could then build a web front end to the > > PythonInterpreter class > > and have a powerful and -- with a well written api > > -- a safe scripting > > interface to our platform. > > > > How can I restrict the java classes which the > > PythonInterpreter class' > > exec and eval methods recognize. > > > > Thanks, > > > > Tait > > > > _______________________________________________ > > Jython-users mailing list > > Jyt...@li... > > http://lists.sourceforge.net/lists/listinfo/jython-users > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Neil B. <nei...@ca...> - 2001-05-02 15:19:59
|
RE: [Jython-users] JPEHello, Thanks for that but I've already looked at that, the problem is that that java plug-in allows me to call JavaBeans with ActiveX environments - I want stuff the other way around! Cheers, Neil -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Garcia, Michael Sent: 02 May 2001 15:41 To: 'Neil Benn '; 'jyt...@li... ' Subject: RE: [Jython-users] JPE Hi Neil, Have not worked with JPE yet but you might consider the Java-ActiveX bridge which is comes as part of the Java Plug-In. Have a look at http://java.sun.com/products/javabeans/software/bridge/, I think it might interest you. If I understand what you are attempting, you could write your ActiveX services in Python and call from Java. Happy Jythoneering, Mick -----Original Message----- From: Neil Benn To: jyt...@li... Sent: 5/2/01 9:54 AM Subject: [Jython-users] JPE Hello, I've been looking at running Pyhton scripts from JAVA and initally started looking at Jython. However Jython runs in the JVM and therefore I'm losing out on the ability to call out to other systems (most specifically ActiveX). I've seen and Java-Python bridge called JPE from Arkane software - the question is - has anybody got any experiences with it good or bad? All/any help appreciated. Cheers, Neil Benn Automation Informatics Scientist CaT _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Garcia, M. <mg...@Bu...> - 2001-05-02 14:58:05
|
Hi Adam, I have not done this before but here is my 2 cents worth. There is a way to take advantage of this but it requires a change in the way the interpreter gets created. The interpreter will have to be created through a special class loader which uses a SecurityManager. The SM would give the interpreter instance the permissions to perform certain functions such as disk i/o. I think this should work since the interpreter is a java class. Any class the interpreter loads will then (I believe) have the same security settings as the interpreter itself. Hope that gives you some ideas. Mick -----Original Message----- From: Adam Berger To: jyt...@li... Sent: 5/2/01 2:18 AM Subject: Re: [Jython-users] restricting java classes access in jython On a related note, is there any way to take advantage of the java security system to make (untrusted) python code run in an environment similar to that given to applets? That is, no access to the disk drive, etc. I'm sure I'm not the only one using jython as an unrtusted extension language... having security guarantees would be magnifique. Adam --- Tait Larson <ta...@we...> wrote: > I'm experimenting with building a jython interpreter > into our java > platform. The our java platform implements the > business logic of a web > application. > > I'd like to restrict the jython interpreter so that > it can only > directly access specific classes currently available > in the running > jvm. I could then build a web front end to the > PythonInterpreter class > and have a powerful and -- with a well written api > -- a safe scripting > interface to our platform. > > How can I restrict the java classes which the > PythonInterpreter class' > exec and eval methods recognize. > > Thanks, > > Tait > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Garcia, M. <mg...@Bu...> - 2001-05-02 14:48:31
|
Hi Neil, Have not worked with JPE yet but you might consider the Java-ActiveX bridge which is comes as part of the Java Plug-In. Have a look at http://java.sun.com/products/javabeans/software/bridge/, I think it might interest you. If I understand what you are attempting, you could write your ActiveX services in Python and call from Java. Happy Jythoneering, Mick -----Original Message----- From: Neil Benn To: jyt...@li... Sent: 5/2/01 9:54 AM Subject: [Jython-users] JPE Hello, I've been looking at running Pyhton scripts from JAVA and initally started looking at Jython. However Jython runs in the JVM and therefore I'm losing out on the ability to call out to other systems (most specifically ActiveX). I've seen and Java-Python bridge called JPE from Arkane software - the question is - has anybody got any experiences with it good or bad? All/any help appreciated. Cheers, Neil Benn Automation Informatics Scientist CaT _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Neil B. <nei...@ca...> - 2001-05-02 13:56:26
|
Hello, I've been looking at running Pyhton scripts from JAVA and initally started looking at Jython. However Jython runs in the JVM and therefore I'm losing out on the ability to call out to other systems (most specifically ActiveX). I've seen and Java-Python bridge called JPE from Arkane software - the question is - has anybody got any experiences with it good or bad? All/any help appreciated. Cheers, Neil Benn Automation Informatics Scientist CaT |
From: Adam B. <sir...@ya...> - 2001-05-02 06:18:02
|
On a related note, is there any way to take advantage of the java security system to make (untrusted) python code run in an environment similar to that given to applets? That is, no access to the disk drive, etc. I'm sure I'm not the only one using jython as an unrtusted extension language... having security guarantees would be magnifique. Adam --- Tait Larson <ta...@we...> wrote: > I'm experimenting with building a jython interpreter > into our java > platform. The our java platform implements the > business logic of a web > application. > > I'd like to restrict the jython interpreter so that > it can only > directly access specific classes currently available > in the running > jvm. I could then build a web front end to the > PythonInterpreter class > and have a powerful and -- with a well written api > -- a safe scripting > interface to our platform. > > How can I restrict the java classes which the > PythonInterpreter class' > exec and eval methods recognize. > > Thanks, > > Tait > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Tait L. <ta...@we...> - 2001-05-02 05:38:05
|
I'm experimenting with building a jython interpreter into our java platform. The our java platform implements the business logic of a web application. I'd like to restrict the jython interpreter so that it can only directly access specific classes currently available in the running jvm. I could then build a web front end to the PythonInterpreter class and have a powerful and -- with a well written api -- a safe scripting interface to our platform. How can I restrict the java classes which the PythonInterpreter class' exec and eval methods recognize. Thanks, Tait |
From: <ken...@po...> - 2001-05-02 03:03:24
|
Hi All. I would like to make the following two lines of Java code work with Python classes: fromJavaClass = Class.forName("PythonClassSubclassedFromJavaClass"); fromJava = fromJavaClass.newInstance(); Unfortunately, this does not work as I would expect it to. Some experimentation shows that Python classes show up in Java something like org.python.proxies.PythonClassSubclassedFromJavaClass$PythonClassSubclassedFromJavaClass$0 which is not that useful. Is there any way I can affect the Java class name of the Python class? Thanks! -Kenny |
From: Stuart S. <st...@me...> - 2001-05-01 07:00:04
|
Hi Brian, I uncommented the source (org/python/util/jython.java) and recompiled under JDK 1.3, and the properties now get propagated (it works) using the tweaked jython.jar . Been a long time since I've been under the hood in a compiler/interpreter (gcc for HPUX-6.5 back in... um, a while ago...;-) Thank you for both pointing out where the problem was, and reminding me that I can actually do something about it... Stuart brian zimmer wrote: > Stuart, > > Looking at the sourcecode, here's why it doesn't work (this method eventually gets called for -D's): > > public void setProperty(String key, String value) { > properties.put(key, value); > // This only works for Java 1.2. There appears to be no portable > // way to support this under Java 1.1 > // try { > // System.setProperty(key, value); > // } > // catch (SecurityException e) {} > } > > Notice it does not set the System property because of the noted comment. You could optionally change the batch/shell script you use to invoke the jython interpreter to pass the -D arguments to the JVM as opposed to the PVM (the way you are doing it) and then the properties will be available to you. Hope this helps... > > brian > > At 11:22 AM 4/30/2001 -0700, Stuart Swerdloff wrote: > >Hi Folks, > > > > I have a problem with System Properties not being passed in from > >the jython command line in to the jvm (Sun JDK1.3, Win2000) > >The Jython command line allows one to set properties for Python to find, > >but this > >does not > >seem to propagate into the JVM. ... . . . |
From: Adam B. <ada...@gb...> - 2001-04-30 23:09:44
|
The Press section on www.jython.org has some good articles. Vincent Raaijmakers wrote: > Hello all, > > I would like to make a honest descision of what to use: jython vs other > scripting programs for using with java. In our project we are looking of > course to jython but also to Beanshell, LUA, javascript and others. > > Can someone provide with information/experiences/tips or links to articles > to help me without spending a lot of time in self evaluating. > My experience with jython is still too small so I hope there are more > experienced jython users who can and wants to help me. > > Many thanks, > Vincent Raaijmakers > > > _______________________________________________ > JPython-Interest maillist - JPy...@py... > http://mail.python.org/mailman/listinfo/jpython-interest |
From: Ryan S. <FL...@FD...> - 2001-04-30 21:04:16
|
Awsome! That totally worked. Thanks again, -Ryan Ype Kingma <ykingma@access To: fl...@fd... forall.nl> cc: Subject: Re: problems with PythonInterpreter class 04/30/01 04:32 from Java PM Ryan, This might help, (but I'm not sure): http://groups.yahoo.com/group/jpython/message/3914 (Found this searching for SimpleEmbedded.java in google, recommended.) You can also subscribe & post to: jython-users: List-Help: <mailto:jyt...@li...?subject=help> List-Post: <mailto:jyt...@li...> List-Subscribe: <http://lists.sourceforge.net/lists/listinfo/jython-users>, <mailto:jyt...@li...?subject=subscribe> List-Id: <jython-users.lists.sourceforge.net> List-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/jython-users>, <mailto:jyt...@li...?subject=unsubscribe> List-Archive: <http://lists.sourceforge.net/archives//jython-users/> There is also jython-dev (similar list addresses) as a last resort. Good luck Ype Kingma -- email at xs4all.nl |
From: brian z. <bz...@zi...> - 2001-04-30 21:02:03
|
Stuart, Looking at the sourcecode, here's why it doesn't work (this method eventually gets called for -D's): public void setProperty(String key, String value) { properties.put(key, value); // This only works for Java 1.2. There appears to be no portable // way to support this under Java 1.1 // try { // System.setProperty(key, value); // } // catch (SecurityException e) {} } Notice it does not set the System property because of the noted comment. You could optionally change the batch/shell script you use to invoke the jython interpreter to pass the -D arguments to the JVM as opposed to the PVM (the way you are doing it) and then the properties will be available to you. Hope this helps... brian At 11:22 AM 4/30/2001 -0700, Stuart Swerdloff wrote: >Hi Folks, > > I have a problem with System Properties not being passed in from >the jython command line in to the jvm (Sun JDK1.3, Win2000) >The Jython command line allows one to set properties for Python to find, >but this >does not >seem to propagate into the JVM. Incorporating the equivalent into the >Jython code >gave me what I needed for my script/program to work, but in a hardcoded >fashion... > >### this works for Jython >System.setProperty("ORBInitRef","EventService=file:C:\IOR\EventServiceForSTUARTS.ior"); > >System.setProperty("SVCnameroot","NameService"); > >which was otherwise done for the JVM as : > >### this works for Java >java -Xint -DSVCnameroot=NameService >-DORBInitRef="EventService=file:C:\IOR\EventServiceForSTUARTS.ior" ... > >### This does not work for getting the data into the JVM from the Jython >command line >jython -DSVCnameroot=NameService >-DORBInitRef="EventService=file:C:\IOR\EventServiceForSTUARTS.ior" ... > >There is something I must not have understood in the documentation for >the use of >properties. > >Could someone provide insight into how to get properties propagated from > >the jython command line in to the JVM (so I can make use of a >System.getProperty(...) >call within my (or other persons) java class. > >Thank You, > >Stuart > > > > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Stuart S. <st...@me...> - 2001-04-30 18:23:31
|
Hi Folks, I have a problem with System Properties not being passed in from the jython command line in to the jvm (Sun JDK1.3, Win2000) The Jython command line allows one to set properties for Python to find, but this does not seem to propagate into the JVM. Incorporating the equivalent into the Jython code gave me what I needed for my script/program to work, but in a hardcoded fashion... ### this works for Jython System.setProperty("ORBInitRef","EventService=file:C:\IOR\EventServiceForSTUARTS.ior"); System.setProperty("SVCnameroot","NameService"); which was otherwise done for the JVM as : ### this works for Java java -Xint -DSVCnameroot=NameService -DORBInitRef="EventService=file:C:\IOR\EventServiceForSTUARTS.ior" ... ### This does not work for getting the data into the JVM from the Jython command line jython -DSVCnameroot=NameService -DORBInitRef="EventService=file:C:\IOR\EventServiceForSTUARTS.ior" ... There is something I must not have understood in the documentation for the use of properties. Could someone provide insight into how to get properties propagated from the jython command line in to the JVM (so I can make use of a System.getProperty(...) call within my (or other persons) java class. Thank You, Stuart |
From: Glen S. <gl...@en...> - 2001-04-30 16:30:11
|
O > Any thougts on the best way to bind events? > > I'm working with a form that has two text fields and a button; eventually > it's going to be a login form. For the button I'm using: > > btnLogin = java.awt.Button("Login", actionPerformed=processLogin(txtLoginID.text, > txtPasswd.txt)) Inherits from awt.Event.ActionListener in your class and implement the actionPerformed method... like... from java.awt import * from java.awt.event import * class LogonForm(ActionListener): def __init__(self): self.btnLogin = Button("Login") self.txtLoginID = TextField() self.txtPasswd = TextField() ..... (implenent the GUI, etc...) def actionPerformed(self, event): source = event.getSource() if source==self.Login: self.processLogin(self.txtLoginID.text, self.txtPasswd.text) else: #handle some other event... def processLogin(loginID, passwd): #do something... Hope that helps. -- Glen Starchman Enabled Ventures/Enabled Technology Group gl...@en... 206.234.7330 |