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: Mats W. <ma...@la...> - 2001-02-06 18:06:36
|
I'm looking for a nice illustrative diagram of what Jython "does" - in other words, how this piece works together with a "normal" Java environment. I've a simplified Java sketch that goes like this (rendered very roughly into text form): Application: [[ .java sources ]] ==> (( javac compiler )) ==> [[ .class files ]] || || Java Libraries: [[ java classes: .jar files ]] <==> (( JVM )) || || Native Operating System How would I fold Jython, and Jythonc, into the same simplified terms (without getting wildly inaccurate): Or even better - does anyone know of an existing diagram that would make my efforts redundant? Thanks, Mats |
From: Frode R. <fro...@er...> - 2001-02-06 10:26:51
|
Hi, I have a application witch is written fore Jython. Under Win98 the VM is unstable and crash with page fault. I have use 1.1.7B from Sun. Have someone experience with witch VM is most stable on Win98? -- /Frode Reinsnes |
From: syKim <re...@ne...> - 2001-02-06 01:00:47
|
>You can try to open the java console to see the actual error message. On >my version of MSIE it is under the View\Java Console menu. >When I run the applet I will get a "com.ms.security.SecurityExceptionEx: >Unable to access system properties." which is OK. I tried to open java console but, I don't know where it is. when I opened applet in java hompage. it run automatically. but, it's just in java hompage example. (I set the plug-in in control panel for java console) And, I suddenly think up reload.. I showed "hello world!!" in explorer at last.. :) but, It's nessary reloading. When applet first loaded in explorer and bring up the mouse cursor on applet, the error message is " load: HelloApplet can't be instantiated" What can I do something for it? (for show applet when it's first loaded) >I'm guessing that you compiled the applet while running jdk1.3. That >does not work. You will have to use a jdk1.1 when compiling the applet. >If I compile an applet with jdk1.3 and run it in MSIE, I get a > com.ms.security.SecurityExceptionEx: java.io.IOException: bad path: > ...java\awt\event\HierarchyEvent.class >in the MSIE java console. Ok After I test it, I announce to you the result. >PS. Is there anything you can do to avoid sending mails as raw base64. >This is what your mail looks like in my mail program. I have to go >through some manual work in order to read the actual text: I'm sorry, that is my outlook's default. now, I changed it. Happy python :) : syKim |
From: Peter S. <psc...@xs...> - 2001-02-05 13:41:22
|
Hi Jarek, I succeeded to download and install jTkinter. I made it also work with jython (on Win2000) To accomplish this: - moved jTkinter.jar to jython directory - moved the dll's to the jython directory - moved the _tkinter.py and imp.py to the Lib-directory of jython - copied the Lib-folders of jTkinter to the Lib-directory of jython - modified the registry: entry python.path - modified the PATH: included the jython directory - added jTkinter.jar to the classpath - deleted the class-files in the Lib\lib-tk directory. They were regenerated by jython automatically Thanks for the reference !!! Regards, Peter Quoting Jarek Sacha <ja...@ie...>: > I do not know of a way to do it directly from Jython interpreter. However, > if you are running Windows you can try to use IDLE > (http://www.python.org/idle/). You can recall statements, edit code, dump > your session and do many other things there. > > To run IDLE you would need to install jTkinter first. You can find jTkinter > > on SourceForge, it has a copy of IDLE included. Installation for jTkinter > instructions are a bit dated, but generally work (just ignore jpython.jar, > code.py, and javaos.py they are not needed with Jython). > > jTkinter may compile on other platforms, e.g, Linux, but I did not have a > chance to test it. > > Jarek > > At 04:40 AM 2/2/2001, you wrote: > >Hi all, > > > >I new to Jython. I have installed it and experimented with it a bit. I > >like the > >possiblity to walk through the history of statements. > > > >Is there a way to dump all the statements of a session in a file? > > > >Regards > >Peter > > > >_______________________________________________ > >Jython-users mailing list > >Jyt...@li... > >http://lists.sourceforge.net/lists/listinfo/jython-users > > |
From: Syver E. <sy...@cy...> - 2001-02-05 02:32:32
|
Greetings jython-users list readers, I come in peace! (This is my first posting you know ;-) Very cool to layer python on top of java. I have a minor patch to suggest for jythonc that tripped me up some time, while simultaneously fooling around with the classpath (new to java). jythonc in it's current incarnation doesn't seem to handle long filenames too well, or actually it's kindof javac's fault. When compiling from a directory whose path consists of spaces javac trips up when it is fed the current directory in the classpath. The following quick and dirty fix makes it work fine on my machine: As you can see the only thing it does is enclose all the paths in the classpath with "" so that javac won't trip up on directory names that looks like this: h:\my documents\tools\python source From javac.py in tools: def fixClasspath(cpath): temp = [] for each in cpath: temp.append('"' + each + '"') return temp From the function definition compile <snip> # new: # Classpath: # 1. python.jythonc.classpath property # + # 2. java.class.path property # + # 3. sourcedir # + # 4. sys.path if cpath is None: sep = java.io.File.pathSeparator cpath = [] part = sys.registry.getProperty("python.jythonc.classpath") if part != None: cpath.extend(part.split(sep)) part = getClasspath() if part != None: cpath.extend(part.split(sep)) if sourcedir: cpath.append(sourcedir) cpath.extend(sys.path) cpath = fixClasspath(cpath) # fix by Syver Enstad 5. feb. 2001 cpath = sep.join(cpath) cmd.extend([cpathopt, cpath]) cmd.extend(files) print 'Compiling with args:', cmd |
From: syKim <re...@ne...> - 2001-02-04 21:09:25
|
SSBtYWRlIGEgc2ltcGxlIGp5dGhvbiBjb2RlIGFzIHlvdSBrbm93IHRoYXQganVzdCBwcmludCAi aGVsbG8gd29ybGQhISINCg0KSXQgd29ya3Mgc28gd2VsbCB1bmRlciBhcHBsZXR2aWV3ZXIuDQoN CmJ1dCwgSXQganVzdCBzaG93IHJlY3RhbmdsZSBib3ggSW4gTVMgZXhwbG9yZXIuDQoNCkkgZGlk bid0IGtub3cgd2h5IHRoZSByZXN1bHQgbGlrZSB0aGF0Li4NCg0KVG9kYXksIEkgc3VkZGVubHkg dGhpbmsgdXAgcmVsb2FkLi4NCg0KSSBzaG93ZWQgImhlbGxvIHdvcmxkISEiIGluIGV4cGxvcmVy IGF0IGxhc3QuLiA6KQ0KDQpidXQsIEl0J3MgbmVzc2FyeSByZWxvYWRpbmcuDQoNCldoZW4gYXBw bGV0IGZpcnN0IGxvYWRlZCBpbiBleHBsb3JlciBhbmQgYnJpbmcgdXAgdGhlIG1vdXNlIGN1cnNv ciBvbg0KYXBwbGV0LA0KDQp0aGUgZXJyb3IgbWVzc2FnZSBpcyAiDQoNCmxvYWQ6IEhlbGxvQXBw bGV0IGNhbid0IGJlIGluc3RhbnRpYXRlZCINCg0KV2hhdCBjYW4gSSBkbyBzb21ldGhpbmcgZm9y IGl0PyAoZm9yIHNob3cgYXBwbGV0IHdoZW4gaXQncyBmaXJzdCBsb2FkZWQpDQoNCg0K |
From: Syver E. <sy...@cy...> - 2001-02-04 20:51:57
|
subscribe |
From: syKim <re...@ne...> - 2001-02-04 20:01:30
|
SSBtYWRlIGEgc2ltcGxlIGp5dGhvbiBjb2RlIGFzIHlvdSBrbm93IHRoYXQganVzdCBwcmludCAi aGVsbG8gd29ybGQhISINCg0KSXQgd29ya3Mgc28gd2VsbCB1bmRlciBhcHBsZXR2aWV3ZXIuDQoN CmJ1dCwgSXQganVzdCBzaG93IHJlY3RhbmdsZSBib3ggSW4gTVMgZXhwbG9yZXIuDQoNCkkgZGlk bid0IGtub3cgd2h5IHRoZSByZXN1bHQgbGlrZSB0aGF0Li4NCg0KVG9kYXksIEkgc3VkZGVubHkg dGhpbmsgdXAgcmVsb2FkLi4NCg0KSSBzaG93ZWQgImhlbGxvIHdvcmxkISEiIGluIGV4cGxvcmVy IGF0IGxhc3QuLiA6KQ0KDQpidXQsIEl0J3MgbmVzc2FyeSByZWxvYWRpbmcuDQoNCldoZW4gYXBw bGV0IGZpcnN0IGxvYWRlZCBpbiBleHBsb3JlciBhbmQgYnJpbmcgdXAgdGhlIG1vdXNlIGN1cnNv ciBvbg0KYXBwbGV0LA0KDQp0aGUgZXJyb3IgbWVzc2FnZSBpcyAiDQoNCmxvYWQ6IEhlbGxvQXBw bGV0IGNhbid0IGJlIGluc3RhbnRpYXRlZCINCg0KV2hhdCBjYW4gSSBkbyBzb21ldGhpbmcgZm9y IGl0PyAoZm9yIHNob3cgYXBwbGV0IHdoZW4gaXQncyBmaXJzdCBsb2FkZWQpDQo= |
From: Dan W. <dcw...@ea...> - 2001-02-04 00:43:49
|
I just intalled Jython on a RedHat 6.2 machine with jdk118_v1 from Blackdown and I've run into some problems running the demos. When I try to run the demo in Demo/javaclasses I get a segfault. Has anybody used the blackdown jdk with Jython? Is this a java version/vendor compatiblity problem, or could be some kind of configuration problem? -Dan Thread dump follows: 1171 nsadmin@localhost:~/python/Demo/javaclasses >jython Graph.py SIGSEGV 11* segmentation violation stackbase=0xbffff39c, stackpointer=0xbffff210 Full thread dump: "Finalizer thread" (TID:0x40562210, sys_thread_t:0x412a6e0c, state:R) prio=1 "Async Garbage Collector" (TID:0x40562258, sys_thread_t:0x41285e0c, state:R) prio=1 "Idle thread" (TID:0x405622a0, sys_thread_t:0x41264e0c, state:R) prio=0 "Clock" (TID:0x40562088, sys_thread_t:0x41243e0c, state:CW) prio=12 "main" (TID:0x405620b0, sys_thread_t:0x8089368, state:R) prio=5 *current thread* org.python.core.PyJavaClass.setBeanInfoCustom(PyJavaClass.java:575) org.python.core.PyJavaClass.init__dict__(PyJavaClass.java:139) org.python.core.PyJavaClass.initialize(PyJavaClass.java:101) org.python.core.PyJavaClass.init__bases__(PyJavaClass.java:199) org.python.core.PyJavaClass.initialize(PyJavaClass.java:100) org.python.core.PyJavaClass.getProxyClass(PyJavaClass.java:76) org.python.core.PyClass.init(PyClass.java:71) org.python.core.Py.makeClass(Py.java:1382) org.python.core.Py.makeClass(Py.java:1346) org.python.pycode._pyx0.f$0(Graph.py) org.python.pycode._pyx0.call_function(Graph.py) org.python.core.PyTableCode.call(PyTableCode.java:155) org.python.core.Py.runCode(Py.java:1055) org.python.core.__builtin__.execfile(__builtin__.java:288) org.python.core.__builtin__.execfile(__builtin__.java:292) org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:155) org.python.util.jython.main(jython.java:159) Monitor Cache Dump: org.python.core.PyJavaClass@1079534872/1080142848: owner "main" (0x8089368, 2 entries) org.python.core.PyJavaClass@1079534224/1080143928: owner "main" (0x8089368, 2 entries) Registered Monitor Dump: Verifier lock: <unowned> Thread queue lock: <unowned> Name and type hash table lock: <unowned> String intern lock: <unowned> JNI pinning lock: <unowned> JNI global reference lock: <unowned> BinClass lock: <unowned> Class loading lock: <unowned> Java stack lock: <unowned> Code rewrite lock: <unowned> Heap lock: <unowned> Has finalization queue lock: <unowned> Finalize me queue lock: <unowned> Dynamic loading lock: <unowned> Monitor IO lock: <unowned> Child death monitor: <unowned> Event monitor: <unowned> I/O monitor: <unowned> Alarm monitor: <unowned> Waiting to be notified: "Clock" (0x41243e0c) Monitor registry: owner "main" (0x8089368, 1 entry) Thread Alarm Q: |
From: <bc...@wo...> - 2001-02-03 19:35:29
|
[Robert W. Bill] >Hello all, > >This is a generic classpath question but I ran into it while looking at >the recently discussed servlet dispatcher on Win98 (Tomcat 3.2.1, windows98 and >jdk1.2.2). > >When Tomcat loads jar's from it's lib directory it loads them in ALL CAPS (i.e. >%TOMCAT_HOME%\lib\SERVLET.JAR). When this happens, Jython cannot load >classes contained in that jar. After looking closer I realized I could >not load any classes from a jar file that is in the classpath with an >all-caps ".JAR" extension. > >[dos windows] >C:\>set CLASSPATH=c:\myapp\TEST.JAR >C:\>jython >Jython 2.0 on java1.2.2 (JIT: symcjit) >Type "copyright", "credits" or "license" for more information. >>>>from test import unitTest >Traceback (innermost last): > File "<console>", line 1, in ? >ImportError: cannot import name unitTest > >However, java apps still successfully use 'import test.unitTest.*;' > >If I use "set CLASSPATH=c:\myapp\TEST.jar", all is fine. > >I'm not a Windows expert, but I had the impression that everything was >supposed to support such name mangling. Remember that we are parsing the CLASSPATH value with code like: for (int i = 0; i < paths.__len__(); i++) { String entry = paths.get(i).toString(); if (entry.endsWith(".jar") || entry.endsWith(".zip")) { addJarToPackages(new File(entry),true); >The questions: > > Is this really the current behavior or am I confused? Yes, and apparently yes <wink>. > is this expected behavior? No. >Depending on the answers, I'll look at the classloader or pass along >another jython servlet dispatcher with some name-munging and os.sep. Just for info, I have added a version of PyServlet in org.python.util http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/jython/org/python/util/PyServlet.java?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=jython There is still some issues to solve, like how we should add a sensible default sys.path that atleast include the directory of the loaded .py file and how we should manage the namespace of the loaded .py files. regards, finn |
From: Robert W. B. <rb...@di...> - 2001-02-03 15:23:41
|
Hello all, This is a generic classpath question but I ran into it while looking at the recently discussed servlet dispatcher on Win98 (Tomcat 3.2.1, windows98 and jdk1.2.2). When Tomcat loads jar's from it's lib directory it loads them in ALL CAPS (i.e. %TOMCAT_HOME%\lib\SERVLET.JAR). When this happens, Jython cannot load classes contained in that jar. After looking closer I realized I could not load any classes from a jar file that is in the classpath with an all-caps ".JAR" extension. [dos windows] C:\>set CLASSPATH=c:\myapp\TEST.JAR C:\>jython Jython 2.0 on java1.2.2 (JIT: symcjit) Type "copyright", "credits" or "license" for more information. >>>from test import unitTest Traceback (innermost last): File "<console>", line 1, in ? ImportError: cannot import name unitTest However, java apps still successfully use 'import test.unitTest.*;' If I use "set CLASSPATH=c:\myapp\TEST.jar", all is fine. I'm not a Windows expert, but I had the impression that everything was supposed to support such name mangling. The questions: Is this really the current behavior or am I confused? is this expected behavior? Depending on the answers, I'll look at the classloader or pass along another jython servlet dispatcher with some name-munging and os.sep. Thanks, -Robert |
From: Mats W. <ma...@la...> - 2001-02-03 08:51:11
|
> >Grail is a web browser written in python. You can find it on the >python web site, maybe in the Vaults of Parnassus, and I think it is >actually located on sourceforge (try http://grail.sourceforge.net). > >I don't think it is being actively maintained anymore though. Since >Grail is written in python, it was made with the ability to run python >applets. I don't know if they would need to be put in a zip file or >what for the browser to get them. Grail was a CNRI special, made particularly to demonstrate one of their particular concepts. You can get it by following the links on python.org, but be warned: it's very fragile, and there are no plans that I've heard of for anyone to fix it. I played with it for a while and concluded it was unusable. Mats |
From: Jarek S. <ja...@ie...> - 2001-02-03 01:54:41
|
I do not know of a way to do it directly from Jython interpreter. However, if you are running Windows you can try to use IDLE (http://www.python.org/idle/). You can recall statements, edit code, dump your session and do many other things there. To run IDLE you would need to install jTkinter first. You can find jTkinter on SourceForge, it has a copy of IDLE included. Installation for jTkinter instructions are a bit dated, but generally work (just ignore jpython.jar, code.py, and javaos.py they are not needed with Jython). jTkinter may compile on other platforms, e.g, Linux, but I did not have a chance to test it. Jarek At 04:40 AM 2/2/2001, you wrote: >Hi all, > >I new to Jython. I have installed it and experimented with it a bit. I >like the >possiblity to walk through the history of statements. > >Is there a way to dump all the statements of a session in a file? > >Regards >Peter > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Samuele P. <pe...@in...> - 2001-02-03 00:34:25
|
RE: [Jython-dev] applet problemsHi. Sorry for the too quick and not precise remark: jythonc applets compiled wrt the system classes of jdk 1.3 do not work under IE and I think netscape 4.- either. Reason: jdk 1.3 introduces new comp. hierarchy related events, doing is job jythonc introduces explicit references to their handling procs in the applet (proxy): ... public void processHierarchyBoundsEvent(java.awt.event.HierarchyEvent arg0) { super.processHierarchyBoundsEvent(arg0); } public void processHierarchyEvent(java.awt.event.HierarchyEvent arg0) { super.processHierarchyEvent(arg0); } ... java 1.1-like runtimes will fail to link the applet with their system classes => so the applet will not work. Nothing to do directly with class-format or compiler issues. In some sense this broad and sometime spurious references to the actual methods of the base class break some of the nice features of java related to robustness wrt to class changes. But that's the way jythonc actually works. regards, Samuele Pedroni. PS: sorry for the too imprecise -> too technical move. |
From: Coleman, D. <don...@em...> - 2001-02-03 00:09:43
|
Classes compiled with Java2 will work on IE if you don't use 1.2 specific features. You can tell javac which VM version to generate class files for with the -target option javac -target 1.1 Foo.java BTW, target 1.1 is the default For more info see http://java.sun.com/j2se/1.3/docs/tooldocs/win32/javac.html > -----Original Message----- > From: Samuele Pedroni [mailto:pe...@in...] > Sent: Friday, February 02, 2001 7:00 PM > To: jyt...@so...; jyt...@li... > Subject: [Jython-dev] applet problems > > > Hi. > > If I remember well if an applet is compiled under a java2 > javac it won't work > under MS Explorer. It should be > compiled with a java 1.1 javac. > Finn can say more on that. > > regards, Samuele Pedroni > > PS: something about that issue must go in the doc and in the faq. > > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-dev > |
From: Samuele P. <pe...@in...> - 2001-02-03 00:01:44
|
Hi. If I remember well if an applet is compiled under a java2 javac it won't work under MS Explorer. It should be compiled with a java 1.1 javac. Finn can say more on that. regards, Samuele Pedroni PS: something about that issue must go in the doc and in the faq. |
From: D-Man <ds...@ri...> - 2001-02-02 23:31:47
|
On Sat, Feb 03, 2001 at 07:19:12AM +0900, syKim wrote: | | -You could tell users to use the "Grail" browser ;-), it can execute | -"Python Applets". The basic problem with web-browser-based | -applications is your users (web browsers) must have the required | -interpreter/libraries available. Sun did a good job selling java, so | -now all browsers include a java interpreter which allows them to run | -java applets. Browsers aren't including a python interpreter, which | -makes it harder to run python code. I would expect that, since Jython | -is written entirely in Java, and it outputs java code that any JVM can | -run stuff made with jython. Now we just have to solve all the java | -dependencies the browsers have. | | I don't know both "Grail" & python applets. | | How it works? | | How can I get more information about it? | Grail is a web browser written in python. You can find it on the python web site, maybe in the Vaults of Parnassus, and I think it is actually located on sourceforge (try http://grail.sourceforge.net). I don't think it is being actively maintained anymore though. Since Grail is written in python, it was made with the ability to run python applets. I don't know if they would need to be put in a zip file or what for the browser to get them. I think that using jython is the best solution for you since (almost) everybody has a web browser that can run java applets. -D |
From: syKim <re...@ne...> - 2001-02-02 22:19:02
|
DQotWW91IGNvdWxkIHRlbGwgdXNlcnMgdG8gdXNlIHRoZSAiR3JhaWwiIGJyb3dzZXIgOy0pLCAg aXQgY2FuIGV4ZWN1dGUNCi0iUHl0aG9uIEFwcGxldHMiLiAgVGhlIGJhc2ljIHByb2JsZW0gd2l0 aCB3ZWItYnJvd3Nlci1iYXNlZA0KLWFwcGxpY2F0aW9ucyBpcyB5b3VyIHVzZXJzICh3ZWIgYnJv d3NlcnMpIG11c3QgaGF2ZSB0aGUgcmVxdWlyZWQNCi1pbnRlcnByZXRlci9saWJyYXJpZXMgYXZh aWxhYmxlLiAgU3VuIGRpZCBhIGdvb2Qgam9iIHNlbGxpbmcgamF2YSwgc28NCi1ub3cgYWxsIGJy b3dzZXJzIGluY2x1ZGUgYSBqYXZhIGludGVycHJldGVyIHdoaWNoIGFsbG93cyB0aGVtIHRvIHJ1 bg0KLWphdmEgYXBwbGV0cy4gIEJyb3dzZXJzIGFyZW4ndCBpbmNsdWRpbmcgYSBweXRob24gaW50 ZXJwcmV0ZXIsIHdoaWNoDQotbWFrZXMgaXQgaGFyZGVyIHRvIHJ1biBweXRob24gY29kZS4gIEkg d291bGQgZXhwZWN0IHRoYXQsIHNpbmNlIEp5dGhvbg0KLWlzIHdyaXR0ZW4gZW50aXJlbHkgaW4g SmF2YSwgYW5kIGl0IG91dHB1dHMgamF2YSBjb2RlIHRoYXQgYW55IEpWTSBjYW4NCi1ydW4gc3R1 ZmYgbWFkZSB3aXRoIGp5dGhvbi4gIE5vdyB3ZSBqdXN0IGhhdmUgdG8gc29sdmUgYWxsIHRoZSBq YXZhDQotZGVwZW5kZW5jaWVzIHRoZSBicm93c2VycyBoYXZlLg0KDQpJIGRvbid0IGtub3cgYm90 aCAgIkdyYWlsIiAmIHB5dGhvbiBhcHBsZXRzLg0KDQpIb3cgaXQgd29ya3M/DQoNCkhvdyBjYW4g SSBnZXQgbW9yZSBpbmZvcm1hdGlvbiBhYm91dCBpdD8NCg0KDQoNCg== |
From: syKim <re...@ne...> - 2001-02-02 22:13:33
|
DQp0aGFuayB5b3UgZm9yIEFyb25zc29uICYgRCBeIF4NCg0KSXQncyBhbG1vc3QgZG9uZS4uDQoN Ci0gSSB1c2VkIHlvdXIgY29kZSBidXQgY29tcGlsZWQgd2l0aA0KDQotIGp5dGhvbmMgLWMgLWQg LWogSGVsbG8uamFyIEhlbGxvQXBwbGV0LnB5DQoNCi0gYW5kIHVzZWQgSFRNTDoNCg0KLSA8aHRt bD48Ym9keT4NCi0gPGFwcGxldCBjb2RlPSJIZWxsb0FwcGxldC5jbGFzcyINCi0gICAgICAgIGFy Y2hpdmU9IkhlbGxvLmphciINCi0gICAgICAgd2lkdGg9MzAwDQotICAgICAgICBoZWlnaHQ9MjUw Pg0KLTwvYXBwbGV0Pg0KLTwvYm9keT48L2h0bWw+DQoNCi0gTm93IGl0IHdvcmtzIGluIGJvdGgg bmV0c2NhcGUgYW5kIGFwcGxldHZpZXdlciBmb3IgbWUuDQoNCkkgdGVzdGVkIHRoZSBhcHBsZXQg d2l0aCBhYm92ZSBtZXRob2QuLg0KDQp0aGVuIEl0IHdvcmtzIHZlcnkgd2VsbCBpbiBhcHBsZXR2 aWV3ZXIuLihJIGRpZG4ndCB0ZXN0IGl0IGluIG5ldHNjYXBlIHlldCBidXQsIEkgZ3Vlc3MgaXQg d29ya3Mgd2VsbCBeIF4pDQoNCmJ1dCwgaW4gTVMgZXhwbG9yZXIuLiBJdCBkb2Vzbid0IHdvcmsg c28uLg0KDQpJIGd1ZXNzIGl0IHNob3VsZCBoYXZlIHNvbWUgb3B0aW9uIGluIEhUTUwgY29kZSB0 byBiZSBjb21wZXRhYmxlIE1TIGV4cGxvcmVyLg0KDQoNCi0gZGlkbid0IGl0IG1ha2UgYSBIZWxs b0FwcGxldCRfUHlJbm5lci5jbGFzcyBhbHNvPw0KLSBZb3UgYWxzbyBuZWVkIHRoZSBhIGxvdCBv ZiBjbGFzc2VzIGZyb20gdGhlIG9yZy5weXRob24uY29yZQ0KLSBpbiB0aGUgamFyIGZpbGUsIGJ1 dCB0aGF0IGlzIHRha2VuIGNhcmUgb2YgYnkganl0aG9uYy4NCg0KDQpPay4gSXQgbWFrZSB0aGF0 IGZpbGUgdG9vLi4NCg0KYW5kLi4gaXQncyBubyBtb3JlIG5lY2Vzc2l0eSBjb3B5IG9yZyBmb2xk ZXIgZnJvbSBqeXRob24gZm9sZGVyICB0byB3b3JraW5nIGZvbGRlciBeIF47DQoNCg== |
From: D-Man <ds...@ri...> - 2001-02-02 15:14:39
|
On Fri, Feb 02, 2001 at 09:47:53PM +0900, syKim wrote: | | Thank you for your reply again.. You're welcome. | | I tested that two way.. | | first : same your code. | | second : I attached some code behind that like | | if __name__ == '__main__': | import pawt | pawt.test(HelloApplet(), size=(500, 120)) I'm not familiar with the "pawt" module. | | I compiled that several ways. | (just -w . or --core -d or --core -d --jar HelloApplet.jar) | | however, the applet doesn't work. | (in addition, jython should have org folder with java files --> you can know if you test with appletviewer | then, I copied the folder from jython folder to testing folder.) | | when I execute appletviewer, some error occured like that : | | java.lang.NullPointerException | | at org.python.core.PyJavaClass.lookup (PyJavaClass.java:39) | ... In PyJavaClass.java, on line 39, the Jython runtime is trying to dereference a null pointer. I don't know right now what is causing this. | | hmm.. How can I solve this problem? | | and, Is not exist another way to implement web-browser-based application with python? You could tell users to use the "Grail" browser ;-), it can execute "Python Applets". The basic problem with web-browser-based applications is your users (web browsers) must have the required interpreter/libraries available. Sun did a good job selling java, so now all browsers include a java interpreter which allows them to run java applets. Browsers aren't including a python interpreter, which makes it harder to run python code. I would expect that, since Jython is written entirely in Java, and it outputs java code that any JVM can run stuff made with jython. Now we just have to solve all the java dependencies the browsers have. I did a bit more testing: I put my html file and the class files on a web server and tried to load them. I got NoClassDefFound errors for org/python/* classes. Ok, so the jython.jar file is needed in the class path. I ran jythonc with the --jar and --all options. This put my .class files and the jython .class files nicely into a single jar file. Trying again with codebase="myapplet" in the html file (I named the jar file myapplet.jar). Now I'm getting a ClassFormatError: HelloApplet (Bad magic number) error. I think this is related to compiler/interpreter versions. I have to do some work now, but I will try again later. I'm cc'ing the list in case anyone else can shed some light on the issue. -D |
From: Peter S. <psc...@xs...> - 2001-02-02 09:40:29
|
Hi all, I new to Jython. I have installed it and experimented with it a bit. I like the possiblity to walk through the history of statements. Is there a way to dump all the statements of a session in a file? Regards Peter |
From: Brian Z. <bri...@ya...> - 2001-02-02 03:23:24
|
With the changes I made, it works great now. Here are the two classes I changed: pyservlet.PyHandler in the place of the old PyServlet pyservlet.HandlerAwareHttpServlet The same handler can deal with both 1) jython servlet derived from HttpServlet and 2) jython servlet derived from HandlerAwareHttpServlet. Fortunately most info is from request, so only when you need to port SnoopServlet do you need to use 2. I also send this to the jython-dev list in hoping that in future release, we can have servlet support built-in. I view this as one of the big strength of using jython, if JSP is mod_php to apache, we have the equivalent of mod_python now. JDBC, XMLC, imageio, the possiblilities are endless. Following are the two java files and some sample jython servlet scripts. I love it! Thank you jython developers. /Brian // pyservlet/HandlerAwareHttpServlet.java package pyservlet; import javax.servlet.http.*; /** * * @author <a href="mailto:bri...@ya...">Brian Zhou</a> */ public abstract class HandlerAwareHttpServlet extends HttpServlet { protected HttpServlet theHandler = null; public void setHandler(HttpServlet aHandler) { this.theHandler = aHandler; } public HttpServlet getHandler() { return this.theHandler; } } // pyservlet/PyHandler.java package pyservlet; import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.python.util.PythonInterpreter; import org.python.core.*; /** * This servlet is used to tell the if the Apache JServ installation was * successful. * * @author <a href="mailto:stefano@a...">Stefano Mazzocchi</a> */ public class PyHandler extends HttpServlet { static Hashtable servlets = new Hashtable(); // Cache for HttpServlet static Hashtable dates = new Hashtable(); // Timestamps for Cache entries PythonInterpreter interp = new PythonInterpreter(); public void service (ServletRequest req, ServletResponse res) throws ServletException, IOException { HttpServlet servlet = getServlet(getServletContext().getRealPath( ((HttpServletRequest)req).getServletPath()) ); if (servlet != null) { if (servlet instanceof HandlerAwareHttpServlet) { ((HandlerAwareHttpServlet) servlet).setHandler(this); } servlet.service(req, res); } } HttpServlet getServlet(String path) throws ServletException, IOException { Long date = (Long) dates.get(path); if (date != null) { // Check for cache validity File file = new File(path); if (date.longValue() < file.lastModified()) // Cache invalid return (loadServlet(path)); // Reload servlet else return ((HttpServlet) servlets.get(path)); } else { return (loadServlet(path)); // Not in cache, load servlet } } HttpServlet loadServlet(String path) throws ServletException, IOException { HttpServlet servlet = null; File file = new File(path); // Extract servlet name from path (strip ".../" and ".py") int start = path.lastIndexOf(System.getProperty("file.separator")); if (start < 0) start = 0; else start++; int end = path.lastIndexOf(".py"); if (end < 0 || end <= start) end = path.length(); try { // Create servlet interp.execfile(path); PyObject pyServlet = interp.eval(path.substring(start, end)+"()"); servlet = (HttpServlet) pyServlet.__tojava__( Class.forName("javax.servlet.http.HttpServlet")); } catch (PyException e) { System.err.println(e); throw new ServletException("Could not create Jython servlet"); } catch (ClassNotFoundException e) { System.err.println(e); throw new ServletException("Could not create Jython servlet"); } servlets.put(path, servlet); // Add servlet to cache dates.put(path, new Long(file.lastModified())); // Add timestamp return (servlet); } } # hello.py import sys, java, javax class hello(javax.servlet.http.HttpServlet): def doGet(self, req, res): res.setContentType("text/html"); out = res.getOutputStream() out.println("""\ <html> <head><title>Hello World</title></head> <body>Hello World! <P> current server time is: %s </P> </body> </html> """ % (java.util.Date())) out.close() return # titles.py import java, javax class titles(javax.servlet.http.HttpServlet): def doGet(self, request, response): response.setContentType("text/plain") out = response.getOutputStream() self.dbTitles(out) out.close() return def dbTitles(self, out): server, db = "ncv-dev2", "pubs" usr, passwd = "sa", "" driver = "com.inet.tds.TdsDriver" port = 1433 url = "jdbc:inetdae:" + server + ":" + `port` + "?database=" + db java.lang.Class.forName(driver).newInstance() conn = java.sql.DriverManager.getConnection(url, usr, passwd) query = "select title, price, ytd_sales, pubdate from titles" stmt = conn.createStatement() if stmt.execute(query): rs = stmt.getResultSet() while rs and rs.next(): out.println(rs.getString("title")) if rs.getObject("price"): out.println("%2.2f" % rs.getFloat("price")) else: out.println("null") if rs.getObject("ytd_sales"): out.println(rs.getInt("ytd_sales")) else: out.println("null") out.println(rs.getTimestamp("pubdate").toString()) out.println() stmt.close() conn.close() # snoop.py from pyservlet import HandlerAwareHttpServlet class snoop(HandlerAwareHttpServlet): def doGet(self, request, response): out = response.getOutputStream() response.setContentType("text/plain"); out.print("""\ Snoop Servlet """) out.print("""\ Servlet init parameters: """) enum = self.getHandler().getInitParameterNames() while enum.hasMoreElements(): key = enum.nextElement() value = self.getInitParameter(key) out.print("""\ %s = %s """ % (key, value)) out.print("""\ Context init parameters: """) context = self.getHandler().getServletContext() enum = context.getInitParameterNames() while enum.hasMoreElements(): key = enum.nextElement() value = context.getInitParameter(key) out.print("""\ %s = %s """ % (key, value)) out.print("""\ Context attributes: """) context = self.getHandler().getServletContext() enum = context.getAttributeNames() while enum.hasMoreElements(): key = enum.nextElement() value = context.getAttribute(key) out.print("""\ %s = %s """ % (key, value)) out.print("""\ Request attributes: """) enum = request.getAttributeNames() while enum.hasMoreElements(): key = enum.nextElement() value = request.getAttribute(key) out.print("""\ %s = %s """ % (key, value)) out.print("""\ Servlet Name: %s Protocol: %s Scheme: %s Server Name: %s Server Port: %s Server Info: %s Remote Addr: %s Remote Host: %s Character Encoding: %s Content Length: %s Content Type: %s Locale: %s Default Response Buffer Size: %s """ % ( self.getHandler().getServletName(), request.getProtocol(), request.getScheme(), request.getServerName(), request.getServerPort(), self.getHandler().getServletContext().getServerInfo(), request.getRemoteAddr(), request.getRemoteHost(), request.getCharacterEncoding(), request.getContentLength(), request.getContentType(), request.getLocale(), response.getBufferSize() )) out.print("""\ Parameter names in this request: """) enum = request.getParameterNames() while enum.hasMoreElements(): key = enum.nextElement() values = request.getParameterValues(key) out.print(" '%s' = " % key) for value in values: out.print("'%s' " % value) out.println() out.print("""\ Headers in this request: """) enum = request.getHeaderNames() while enum.hasMoreElements(): key = enum.nextElement() value = request.getHeader(key) out.print("""\ %s = %s """ % (key, value)) out.print("""\ Cookies in this request: """) cookies = request.getCookies() for cookie in cookies: out.print("""\ %s = %s """ % (cookie.getName(), cookie.getValue())) out.print("""\ Request Is Secure: %s Auth Type: %s HTTP Method: %s Remote User: %s Request URI: %s Context Path: %s Servlet Path: %s Path Info: %s Path Trans: %s Query String: %s """ % ( request.isSecure(), request.getAuthType(), request.getMethod(), request.getRemoteUser(), request.getRequestURI(), request.getContextPath(), request.getServletPath(), request.getPathInfo(), request.getPathTranslated(), request.getQueryString() )) session = request.getSession() out.print("""\ Requested Session Id: %s Current Session Id: %s Session Created Time: %s Session Last Accessed Time: %s Session Max Inactive Interval Seconds: %d """ % ( request.getRequestedSessionId(), session.getId(), session.getCreationTime(), session.getLastAccessedTime(), session.getMaxInactiveInterval() )) out.print("""\ Session values: """) names = session.getAttributeNames() while names.hasMoreElements(): name = names.nextElement() out.println(" '%s' = '%s'" % (name, session.getAttribute(name))) out.close() return ----- Original Message ----- From: "Brian Zhou" <bri...@ya...> To: <jyt...@li...> Cc: <jyt...@li...> Sent: Wednesday, January 31, 2001 9:34 AM Subject: [Jython-users] servlet problem self.getInitParameterNames() under PyServlet wrapper > Hello list, > > Following http://groups.yahoo.com/group/jpython/message/3714 I succeeded > making servlet running under PyServlet wrapper/handler on win2k tomcat3.2.1. > So far so good, I can run simple script like: > > import sys, java, javax > > class hello(javax.servlet.http.HttpServlet): > def doGet(self, req, res): > res.setContentType("text/html"); > out = res.getOutputStream() > out.println("""\ > <html> > <head><title>Hello World</title></head> > <body>Hello World! > <P> > current server time is: %s > </P> > </body> > </html> > """ % (java.util.Date())) > out.close() > return > > Or even dynamicly generate PNG graph thanks to the new javax.imagio package > from Sun. I don't expect any difficulty hooking up with database using JDBC. > > However, when trying to port SnoopServlet from java to jython, I found that > PyServlet really doesn't handover any instant variables to the jython > HttpServlet subclass except (request, response). So > > enum = self.getInitParameterNames() > > will got a NullPointerException. Any operation involve self.attribute like > self.getServletContext() will also fail. I don't think jythonc compiled > classes will have this problem because the jython servlet handle service() > directly bypassing PyServlet. > > So my questions are: > > 1. Am I missing anything? Any misunderstanding of the API? > 2. Any way around? Anyone got a better PyServlet? > 3. If I'm the first one got bitten, any idea how we may overcome this > problem? > > Seeing the power of dynamic python scripting at work (instant feedback > without re-compiling), I really appreciate what have been done so far, and > want to get it going. Here are some of my ideas: > > 1. We can have two seperate subclasses of HttpServlet in java: > one possibly named ServletPyHandler, doing what PyServlet currently is > doing, dispatching service() calls to jython servlet; > the other JyServlet being superclass of all jython servlets, with > constructor JyServlet(ServletPyHandler), so JyServlet always has a ref to > the ServletPyHandler instance; > The downside of this approach is that now jythonc compiled servlet and > dynamically interpreted servlet have to be written differently. > > 2. Have ServletPyHandler do somthing to the jython servlet class right > before dispatching service() call, so that inside jython servlet, later when > messages like self.getInitParameterNames() will be redirected back to > ServletPyHandler. > > TIA for any ideas, > > /Brian > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Brian Z. <bri...@ya...> - 2001-02-01 20:56:18
|
It works great with the change I made. Attached are the two classes I changed: pyservlet.PyHandler in the place of the old PyServlet pyservlet.HandlerAwareHttpServlet The same handler can deal with both 1) jython servlet derived from HttpServlet and 2) jython servlet derived from HandlerAwareHttpServlet. Fortunately most info is from request, so only when you need to port SnoopServlet do you need to use 2. I also send this to the jython-dev list in hoping that in future release, we can have servlet support built-in. I view this as one of the big strength of using jython, if JSP is mod_php to apache, we have the equivalent of mod_python now. JDBC, XMLC, imageio, the possiblilities are endless. Following are some sample jython servlet scripts. I love it! Thank you jython developers. /Brian # hello.py import sys, java, javax class hello(javax.servlet.http.HttpServlet): def doGet(self, req, res): res.setContentType("text/html"); out = res.getOutputStream() out.println("""\ <html> <head><title>Hello World</title></head> <body>Hello World! <P> current server time is: %s </P> </body> </html> """ % (java.util.Date())) out.close() return # titles.py import java, javax class titles(javax.servlet.http.HttpServlet): def doGet(self, request, response): response.setContentType("text/plain") out = response.getOutputStream() self.dbTitles(out) out.close() return def dbTitles(self, out): server, db = "ncv-dev2", "pubs" usr, passwd = "sa", "" driver = "com.inet.tds.TdsDriver" port = 1433 url = "jdbc:inetdae:" + server + ":" + `port` + "?database=" + db java.lang.Class.forName(driver).newInstance() conn = java.sql.DriverManager.getConnection(url, usr, passwd) query = "select title, price, ytd_sales, pubdate from titles" stmt = conn.createStatement() if stmt.execute(query): rs = stmt.getResultSet() while rs and rs.next(): out.println(rs.getString("title")) if rs.getObject("price"): out.println("%2.2f" % rs.getFloat("price")) else: out.println("null") if rs.getObject("ytd_sales"): out.println(rs.getInt("ytd_sales")) else: out.println("null") out.println(rs.getTimestamp("pubdate").toString()) out.println() stmt.close() conn.close() ----- Original Message ----- From: "Brian Zhou" <bri...@ya...> To: <jyt...@li...> Cc: <jyt...@li...> Sent: Wednesday, January 31, 2001 9:34 AM Subject: [Jython-users] servlet problem self.getInitParameterNames() under PyServlet wrapper > Hello list, > > Following http://groups.yahoo.com/group/jpython/message/3714 I succeeded > making servlet running under PyServlet wrapper/handler on win2k tomcat3.2.1. > So far so good, I can run simple script like: > > import sys, java, javax > > class hello(javax.servlet.http.HttpServlet): > def doGet(self, req, res): > res.setContentType("text/html"); > out = res.getOutputStream() > out.println("""\ > <html> > <head><title>Hello World</title></head> > <body>Hello World! > <P> > current server time is: %s > </P> > </body> > </html> > """ % (java.util.Date())) > out.close() > return > > Or even dynamicly generate PNG graph thanks to the new javax.imagio package > from Sun. I don't expect any difficulty hooking up with database using JDBC. > > However, when trying to port SnoopServlet from java to jython, I found that > PyServlet really doesn't handover any instant variables to the jython > HttpServlet subclass except (request, response). So > > enum = self.getInitParameterNames() > > will got a NullPointerException. Any operation involve self.attribute like > self.getServletContext() will also fail. I don't think jythonc compiled > classes will have this problem because the jython servlet handle service() > directly bypassing PyServlet. > > So my questions are: > > 1. Am I missing anything? Any misunderstanding of the API? > 2. Any way around? Anyone got a better PyServlet? > 3. If I'm the first one got bitten, any idea how we may overcome this > problem? > > Seeing the power of dynamic python scripting at work (instant feedback > without re-compiling), I really appreciate what have been done so far, and > want to get it going. Here are some of my ideas: > > 1. We can have two seperate subclasses of HttpServlet in java: > one possibly named ServletPyHandler, doing what PyServlet currently is > doing, dispatching service() calls to jython servlet; > the other JyServlet being superclass of all jython servlets, with > constructor JyServlet(ServletPyHandler), so JyServlet always has a ref to > the ServletPyHandler instance; > The downside of this approach is that now jythonc compiled servlet and > dynamically interpreted servlet have to be written differently. > > 2. Have ServletPyHandler do somthing to the jython servlet class right > before dispatching service() call, so that inside jython servlet, later when > messages like self.getInitParameterNames() will be redirected back to > ServletPyHandler. > > TIA for any ideas, > > /Brian > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: D-Man <ds...@ri...> - 2001-02-01 17:22:02
|
On Thu, Feb 01, 2001 at 09:02:47AM +0200, Donatas Simkunas wrote: | I tried to use jTkinter under linux, it compiles but with warnings, but i | newer got it working. | | So i was forced to use vim or jedit. Forced to use vim? I use (g)vim by choice. For debugging I typically use "print". I have also recently discovered Source Navigator (http://source.redhat.com). I does a bunch of class browsing and cross-referencing for C C++ Java FORTRAN COBOL Tcl and Python. It has an editor in it, but I only use is as a color coded text viewer (as in I don't edit with it). -D | | On Thursday 01 February 2001 07:12, Jarek Sacha wrote: | > Would it be possible to use IDLE with jython? This probably requires | > jTkinter, does it work with jython? | > What do you use to prototype and debug in jython? | > | > Jarek | > |
From: Samuele P. <pe...@in...> - 2001-02-01 14:40:22
|
Some documentation about the java reload (experimental) simple support - that comes with jython 2.0 - is now available online: http://www.jython.org/docs/jreload.html We encourage everybody interested in java class reloading from jython, to read the doc and to try 'jreload'. Feedback (to jython-dev) and bug reports are welcome. The jreload.py file that comes with jython 2.0 contains a little typo (actual CVS version has been fixed): --- jreload.typo Thu Feb 1 15:14:43 2001 +++ jreload.py Thu Feb 1 15:13:12 2001 @@ -84,7 +84,7 @@ return _Unload(ls) def makeLoadSet(name,path): - if sys.modules.has_key('name'): return sys.modules[name] + if sys.modules.has_key(name): return sys.modules[name] sys.modules[name] = ls = LoadSet(name,path) return ls Thanks to Thomas Breuel for reporting this. Cheers, the jython-developers PS: the cited example files are now in the CVS tree. |