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: Donatas S. <do...@no...> - 2001-03-15 09:31:15
|
You can use any GUI available for java: awt or swing. On Thursday 15 March 2001 11:00, Georg Umgiesser wrote: > Hallo, > > I like the idea of using Jython in parallel with Python. However, > I did not find any message in the Jython homepage on GUI's. > What GUI's are supported? Is Tkinter supported? > > Thanks, > > Georg -- Donatas Simkunas Senior Programmer No Magic Phone: +370 7 32 40 32 Fax: +370 7 320670 e-mail: do...@no... WWW: http://www.nomagic.com |
From: Georg U. <ge...@is...> - 2001-03-15 08:59:10
|
Hallo, I like the idea of using Jython in parallel with Python. However, I did not find any message in the Jython homepage on GUI's. What GUI's are supported? Is Tkinter supported? Thanks, Georg -- __ ^/..\^ ----------------------------------------------------------m( 00 )m--- Georg Umgiesser | e-mail : ge...@is... Oceanography, ISDGM-CNR | web : http://www.isdgm.ve.cnr.it/~georg/ 1364 S. Polo | tel : ++39 - 041 - 5216 875 30125 Venezia, Italia | fax : ++39 - 041 - 2602 340 --------------------------------------------------------------------- |
From: <bc...@wo...> - 2001-03-15 08:32:42
|
[Richard Gruet] >Hi, > >If I define a Java 2 exceptions classes with one being a subclass of the >other: > >public class BaseException extends Exception >{ ... } > >public class DerivedException extends BaseException >{ ... } > >And if the DerivedException is raised in a Java program, I can catch it >in Jython as a DerivedException but *not* as a BaseException, i.e the >following code: > >try: > # call the java prog that raises a DerivedException >except DerivedException, e: > print "Got a DerivedException :", e > >... will display "Got a DerivedException : ...." (which is OK) > >whereas the code: > >try: > # call the java prog that raises a DerivedException >except BaseException, e: > print "Got a BaseException :", e >else: > import sys > exc_type, exc_value, exc_traceback = sys.exc_info() > print 'uncaught exception', exc_type, exc_value, exc_traceback > >...will display "uncaught exception ..." instead of "Got a >BaseException..." > >This looks abnormal to me! >Am I missing something or is it a bug ? Thanks for any clue. The code belows works for me. Could you create a small standalone example of the problem? regards, finn ------------ BaseException.java ------------ public class BaseException extends Exception { } ------------ DerivedException.java ------------ public class DerivedException extends BaseException { } ------------ j.java ------------ public class j { public static void foo() throws BaseException { throw new BaseException(); } public static void bar() throws BaseException { throw new DerivedException(); } public static void baz() throws DerivedException { throw new DerivedException(); } } ------------ tst.py ------------ import j, BaseException, DerivedException try: raise DerivedException() except DerivedException, e: print "Got a DerivedException :", e try: raise DerivedException() except BaseException, e: print "Got a BaseException :", e else: import sys exc_type, exc_value, exc_traceback = sys.exc_info() print 'uncaught exception', exc_type, exc_value, exc_traceback try: j.bar() except DerivedException, e: print "Got a DerivedException :", e try: j.bar() except BaseException, e: print "Got a BaseException :", e try: j.foo() except BaseException, e: print "Got a BaseException :", e else: import sys exc_type, exc_value, exc_traceback = sys.exc_info() print 'uncaught exception', exc_type, exc_value, exc_traceback try: j.baz() except BaseException, e: print "Got a BaseException :", e |
From: <bc...@wo...> - 2001-03-15 08:32:30
|
[John Mudd] >I tried jythonc as follows with the --all option so that I can run w/o >the jython jar file present. I was able to get this to work for one >application but not this one. It isn't the jython.jar itself, but the python.home property which is causing the difference. In Jython-2.0 a bug exists in os.java that demand that sys.prefix have a non-null value. When jython.jar exist in the classpath, the python.home and sys.prefix is initialized to the directory of the jython.jar file. As a workaround you can assign a value to sys.prefix before importing the "os" module. import sys sys.prefix = "." import os The bug in "os" is solved in Jython-2.1a1. regards, finn |
From: Richard G. <rg...@in...> - 2001-03-14 21:24:50
|
Hi, If I define a Java 2 exceptions classes with one being a subclass of the other: public class BaseException extends Exception { ... } public class DerivedException extends BaseException { ... } And if the DerivedException is raised in a Java program, I can catch it in Jython as a DerivedException but *not* as a BaseException, i.e the following code: try: # call the java prog that raises a DerivedException except DerivedException, e: print "Got a DerivedException :", e ... will display "Got a DerivedException : ...." (which is OK) whereas the code: try: # call the java prog that raises a DerivedException except BaseException, e: print "Got a BaseException :", e else: import sys exc_type, exc_value, exc_traceback = sys.exc_info() print 'uncaught exception', exc_type, exc_value, exc_traceback ...will display "uncaught exception ..." instead of "Got a BaseException..." This looks abnormal to me! Am I missing something or is it a bug ? Thanks for any clue. Richard |
From: John M. <joh...@ya...> - 2001-03-14 19:20:18
|
I tried jythonc as follows with the --all option so that I can run w/o the jython jar file present. I was able to get this to work for one application but not this one. That's strange because the two apps are somewhat similiar. In both cases I did not have jython.jar in the CLASSPATH when I started jythonc. jythonc --all --package com.repository.disk --jar $(JAR) $(JPYTHONSRCS) Here are the error msgs that I get if I try to run and I purposely leave jython.jar out of the CLASSPATH. It runs fine if I put jython.jar in the path. Any suggestions? Java Traceback: at org.python.core.Py.JavaError(Py.java:238) at org.python.core.PyTableCode.call(PyTableCode.java:159) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.imp.createFromClass(imp.java:178) at org.python.core.imp.loadPrecompiled(imp.java:246) at org.python.core.imp.loadFromPath(imp.java:257) at org.python.core.imp.loadFromPath(imp.java:252) at org.python.core.imp.load(imp.java:357) 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.importFromAs(imp.java:566) at com.repository.disk.objDiskSet$_PyInner.main$14(objDiskSet.java:941) at com.repository.disk.objDiskSet$_PyInner.call_function(objDiskSet.java:306) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.imp.createFromClass(imp.java:178) at org.python.core.imp.loadPrecompiled(imp.java:246) at org.python.core.imp.loadFromPath(imp.java:257) at org.python.core.imp.loadFromPath(imp.java:252) at org.python.core.imp.load(imp.java:357) 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.importFromAs(imp.java:566) at com.repository.disk.diskServer$_PyInner.main$51(diskServer.java:1461) at com.repository.disk.diskServer$_PyInner.call_function(diskServer.java:418) 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 com.repository.disk.diskServer.main(diskServer.java:2140) Traceback (innermost last): File "/new1/mudd/cvs/dINT40.3/src/com/repository/disk/diskServer.py", line 0, in main File "/new1/mudd/cvs/dINT40.3/src/com/repository/disk/objDiskSet.py", line 0, in main File "/new1/mudd/cvs/dINT40.3/src/com/repository/disk/diskUsageThread.py", line 0, in main java.lang.ExceptionInInitializerError: java.lang.NullPointerException at org.python.modules.os.<clinit>(os.java:11) at java.lang.reflect.Method.invoke(Native Method) at org.python.core.PyJavaClass.initialize(PyJavaClass.java:108) at org.python.core.PyJavaClass.lookupGivingClass(PyJavaClass.java:666) at org.python.core.PyClass.lookup(PyClass.java:164) at org.python.core.PyJavaClass.__findattr__(PyJavaClass.java:712) at org.python.core.PyObject.impAttr(PyObject.java:633) at org.python.core.imp.dottedFind(imp.java:412) at org.python.core.imp.importName(imp.java:436) 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.importFromAs(imp.java:566) at com.repository.disk.diskUsageThread$_PyInner.main$8(diskUsageThread.java:334) at com.repository.disk.diskUsageThread$_PyInner.call_function(diskUsageThread.java:96) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.imp.createFromClass(imp.java:178) at org.python.core.imp.loadPrecompiled(imp.java:246) at org.python.core.imp.loadFromPath(imp.java:257) at org.python.core.imp.loadFromPath(imp.java:252) at org.python.core.imp.load(imp.java:357) 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.importFromAs(imp.java:566) at com.repository.disk.objDiskSet$_PyInner.main$14(objDiskSet.java:941) at com.repository.disk.objDiskSet$_PyInner.call_function(objDiskSet.java:306) at org.python.core.PyTableCode.call(PyTableCode.java:155) at org.python.core.imp.createFromCode(imp.java:157) at org.python.core.imp.createFromClass(imp.java:178) at org.python.core.imp.loadPrecompiled(imp.java:246) at org.python.core.imp.loadFromPath(imp.java:257) at org.python.core.imp.loadFromPath(imp.java:252) at org.python.core.imp.load(imp.java:357) 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.importFromAs(imp.java:566) at com.repository.disk.diskServer$_PyInner.main$51(diskServer.java:1461) at com.repository.disk.diskServer$_PyInner.call_function(diskServer.java:418) 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 com.repository.disk.diskServer.main(diskServer.java:2140) java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ |
From: <bc...@wo...> - 2001-03-14 15:33:17
|
I am happy to announce the first alpha release of Jython 2.1. Jython is a Java implementation of the Python programming language. It allows users to compile Python source code to Java byte codes, and run the resulting bytecodes on any Java Virtual Machine. It is a very seamless and smooth integration with Java: from Python you have complete access to all Java libraries, can build applets, can integrate with Java beans, and can subclass Java classes in Python and vice versa. Like Python, and unlike Java, Jython can also be used interactively: just type some Jython code at the prompt and see the results immediately. A java installer is available for download at the Jython website: http://www.jython.org/ Installation of version 2.1a1 is similar to version 2.0. Further information and tips on installation is available at: http://www.jython.org/install.html Jython 2.1 aims to be feature compatible with Python 2.1 and among the new feature are: - Nested scopes - The warning framework - Rich comparison - The numeric coercion model have changed. - Function attributes. The changes from Jython-2.0 include: New features. - Improve speed when indexing a string and iterating over a string in a for loop. - Reworked coercing model (pep-0208) - Added {}.popitem(). - Improved speed for python files by buffering the RandomAccessFile. - Added function attributes (pep-0232) - Rich comparison (pep-0207) - Updated cPickle to handle CPython compatible unicode strings. - Updated sre to CPython-2.1a1 - Added the "new" module - Added a PyServlet class to the util package. - Warning framework (pep-0230). - Added sys.add_classdir and sys.add_extdir. - Added nested scope to the interpreter (pep-0227). Bug fixes. - Allow self referencing adapters to be collected when using weak tables. - Added workaround for a reader bug in MRJ22Jitc.01. - Fixes #127340 where serializable parameter received a PyObject instead of the wrapped java object. - Include a LineNumberTable in the compiled class files. - Fixed a java version test bug in the installer. A complete list of changes and differences are available here: http://www.jython.org/NEWS.html Bugs can be reported to the bug manager on SourceForge: http://sourceforge.net/bugs/?group_id=12867 Cheers, the jython-developers |
From: Eduardo J. F. C. <EFE...@sa...> - 2001-03-14 08:32:44
|
Finn,=20 that was it. I just moved the Hello$_PyInner.class to the servlets dir = where Hello.class was and it works perfectly now. Sorry for bothering you all with such a simple thing. Is this documented = somewhere? Best regards and thank you very much. Now I don't have to write Java code = :-) -- Eduardo J. Fern=E1ndez Corrales >>> Finn Bock <bc...@wo...> 13/03/01 21:45 >>> >>- Compiled the servlet with jythonc. I get some deprecation warnings=20 > >Which is ok. > >>but the Hello.class file gets generated. > >And so does the Hello$_PyInner.class file. The two classfiles belong >together. Also, when you compile with jythonc make absolutely sure that >the output include the text: > >Creating .java files: > Hello module > Hello extends javax.servlet.http.HttpServlet > >If you don't see that message there is a problem, usually with the >classpath during the jythonc compilation. > >- Moved the .class to the servlet directory=20 > >You have to move both the generated class files. > >regards, >finn _______________________________________________ Jython-users mailing list Jyt...@li...=20 http://lists.sourceforge.net/lists/listinfo/jython-users |
From: <bc...@wo...> - 2001-03-13 20:45:09
|
[Eduardo Jesus Fernandez Corrales] >Hello everyone: > >I am trying to run a compiled servlet written in Jython. Here's what I = >have done > >- I have installed Jython 2.0 in windows NT workstation with servicepack = >6, using java 1.2.2 >- Wrote the servlet in file Hello.py. This is the usual simple servlet = >that just prints hello world >- Compiled the servlet with jythonc. I get some deprecation warnings Which is ok. >but the Hello.class file gets generated. And so does the Hello$_PyInner.class file. The two classfiles belong together. Also, when you compile with jythonc make absolutely sure that the output include the text: Creating .java files: Hello module Hello extends javax.servlet.http.HttpServlet If you don't see that message there is a problem, usually with the classpath during the jythonc compilation. >- Moved the .class to the servlet directory You have to move both the generated class files. regards, finn |
From: <bc...@wo...> - 2001-03-13 20:32:56
|
[Kent Johnson] >I found two problems building the CVS snapshot of 20010310 under Java 1.1: > >Module.java line 347: >Vector.toArray() is not in Java 1.1 > >I replaced > private static final String[] emptyStringAr = new String[0]; > > private String[] toNameAr(Vector names,boolean nullok) { > int sz = names.size(); > if (sz ==0 && nullok) return null; > return (String[])names.toArray(emptyStringAr); > } > >with > > private String[] toNameAr(Vector names,boolean nullok) { > int sz = names.size(); > if (sz ==0 && nullok) return null; > String[] nameArray = new String[sz]; > names.copyInto(nameArray); > return nameArray; > } > > >PyServlet.java line 75 and following: >Properties.setProperty(String, String) is not in Java 1.1, use >Properties.put(Object, Object) instead. > >I hope someone can make these changes in CVS, I don't have write access. Thanks for the feedback. The two changes have now been committed. regards, finn |
From: <bc...@wo...> - 2001-03-13 20:29:21
|
[Benjamin Collar] >So, say I've got a java class A, and a "subclass" B done in jython. Should >I be able to do the following in a java program: > >A a = null; >Class c (previously initialized to have an instance of B); > >a = (A) c.newInstance(); > >If not, why not? You can't create instances of jython subclasses with newInstance because of a bug in Jython-2.0. You will eventually end up with a message like: module '__main__' has no attribute '__main__$B' This bug have been fixed in the CVS and the fix will be included in the up comming Jython-2.1. regards, finn |
From: Eduardo J. F. C. <EFE...@sa...> - 2001-03-13 17:24:18
|
Still no success, after adding self to the doGet() method. (And now the = deprecation warning appears again) This is what appears in the apache error.log Java Traceback: at org.python.core.Py.AttributeError(Py.java:90) at org.python.core.PyObject.__getattr__(PyObject.java, Compiled = Code) at org.python.core.Py.initProxy(Py.java, Compiled Code) at Hello.<init>(Hello.java:139) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java, Compiled Code) at org.apache.jserv.JServServletManager.load_init(JServServletManag= er.java) at org.apache.jserv.JServServletManager.loadServlet(JServServletMan= ager.java) at org.apache.jserv.JServConnection.processRequest(JServConnection.= java) at org.apache.jserv.JServConnection.run(JServConnection.java) at java.lang.Thread.run(Thread.java:479) Traceback (innermost last): (no code object) at line 0 AttributeError: class 'Hello' has no attribute 'Hello' Thanks to everyone that is taking the time to check into this. Best regards. -- Eduardo J. Fernandez Corrales >>> "Robert W. Bill" <rb...@di...> 13/03/01 17:35 >>> On Tue, 13 Mar 2001, brian zimmer wrote: > Robert, >=20 > This works for you? Don't you need to add 'self' to the doGet()=20 > method? It's an instance method, no? YES! Thank you. Typing changes in reply instead of copy/paste=20 from the servlet was just error prone. Sooo sorry about that. Brian is right, it must have self as first parameter to method. =20 Robert |
From: Robert W. B. <rb...@di...> - 2001-03-13 16:32:07
|
On Tue, 13 Mar 2001, brian zimmer wrote: > Robert, > > This works for you? Don't you need to add 'self' to the doGet() > method? It's an instance method, no? YES! Thank you. Typing changes in reply instead of copy/paste from the servlet was just error prone. Sooo sorry about that. Brian is right, it must have self as first parameter to method. Robert > At 09:07 AM 3/13/2001 -0600, Robert W. Bill wrote: > > > >On Tue, 13 Mar 2001, Eduardo Jesus Fernandez Corrales wrote: > > > > > > Sure, there it goes. > > > > > > I am posting the generated file too, in case someone wants to check if > > it runs. > > > >"*" in import, Hmmmmmm. I tried the following with success... > > > > > >#spare imports removed and "*" replace with explicit package name > >from javax.servlet import http > > > ># prefix superclass with explicit package name "http." > >class Hello(http.HttpServlet): > > def doGet(req, res): > > res.setContentType("text/html") > > out = res.getWriter() > > out.println("<html><head><title>Hello World!</title></head>") > > out.println("<body><h1>Hello World!</h1></body></html>") > > > > > >Another suspicion is the classpath when you compile. Last I checked, you > >can compile something like above _without_ javax.servlet in the > >classpath and with no compile errors. However, at runtime you get a NPE, > >so you need to make sure javax.servlet.*... is in the classpath rather > >than relying on compile time errors to remind you (I don't remember the > >original post though, so this may not apply.) > > > > > > > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> > > > >It's hard to tell without the servlet file, but make sure the file > > Hello.py > > > >has a single class called 'Hello' that extends from HttpServlet: > > > >I think there can be more than one class. If you have multiple classes > >in the file, the servlet class (the subclass of HttpServlet) should be the > >same name as the file. > > > >Cheers, > >Robert > > > > > > > > > >_______________________________________________ > >Jython-users mailing list > >Jyt...@li... > >http://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Garcia, M. <mg...@Bu...> - 2001-03-13 16:01:29
|
Since you are using Jython can I suggest using Java serialization? It is a little more verbose that shelve but is fairly straightforward. This is not an answer to your original question but an alternative. Mick -----Original Message----- From: John Hethcox To: jyt...@li... Sent: 3/13/01 12:53 AM Subject: [Jython-users] whichdb indeed! All, The following script runs in python, but not jython: import shelve subd = { "hula":"hoop", "sevenof":9 } d = shelve.open( "dictfile" ) d["hoop"] = "skirt" d["polo"] = "pony" d["subber"] = subd d.close() d = shelve.open( "dictfile" ) print d["subber"] This is the output from the jython run: jython.bat shelvetest.py Traceback (innermost last): File "shelvetest.py", line 4, in ? File "e:\Jython\Lib\shelve.py", line 157, in open File "e:\Jython\Lib\shelve.py", line 147, in __init__ File "e:\Jython\Lib\anydbm.py", line 71, in open ImportError: no module named whichdb whichdb.py is not in the the jython distribution so I borrowed the one from python. That eventually led to other problems (which I omit here). What is the best strategy for getting shelve to work? Thanks (again) John <<Card for John Hethcox>> |
From: Eduardo J. F. C. <EFE...@sa...> - 2001-03-13 15:50:53
|
Robert, I have tried with your code and it still does not work. The same happens with the code sent by Brian Zimmer. That is: the servlet just hangs there doing nothing and the apache error = log shows the same error that I sent in the first message in this thread. However with your code I don't get the deprecation warning I got before. Also I have checked and servlet.jar (which contains javax.servlet) is in = the classpath and in the Jserv wrapper.classpath. Best regards and thanks for your help. -- Eduardo J. Fernandez Corrales >>> "Robert W. Bill" <rb...@di...> 13/03/01 16:07 >>> On Tue, 13 Mar 2001, Eduardo Jesus Fernandez Corrales wrote: > > Sure, there it goes. > > I am posting the generated file too, in case someone wants to check if = it runs. "*" in import, Hmmmmmm. I tried the following with success... #spare imports removed and "*" replace with explicit package name from javax.servlet import http # prefix superclass with explicit package name "http." class Hello(http.HttpServlet): def doGet(req, res): res.setContentType("text/html") out =3D res.getWriter() out.println("<html><head><title>Hello World!</title></head>") out.println("<body><h1>Hello World!</h1></body></html>") Another suspicion is the classpath when you compile. Last I checked, you can compile something like above _without_ javax.servlet in the classpath and with no compile errors. However, at runtime you get a NPE, so you need to make sure javax.servlet.*... is in the classpath rather than relying on compile time errors to remind you (I don't remember the original post though, so this may not apply.) > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> > >It's hard to tell without the servlet file, but make sure the file = Hello.py > >has a single class called 'Hello' that extends from HttpServlet: I think there can be more than one class. If you have multiple classes in the file, the servlet class (the subclass of HttpServlet) should be the same name as the file. Cheers, Robert _______________________________________________ Jython-users mailing list Jyt...@li...=20 http://lists.sourceforge.net/lists/listinfo/jython-users |
From: brian z. <bz...@zi...> - 2001-03-13 15:21:48
|
Robert, This works for you? Don't you need to add 'self' to the doGet() method? It's an instance method, no? brian At 09:07 AM 3/13/2001 -0600, Robert W. Bill wrote: >On Tue, 13 Mar 2001, Eduardo Jesus Fernandez Corrales wrote: > > > > Sure, there it goes. > > > > I am posting the generated file too, in case someone wants to check if > it runs. > >"*" in import, Hmmmmmm. I tried the following with success... > > >#spare imports removed and "*" replace with explicit package name >from javax.servlet import http > ># prefix superclass with explicit package name "http." >class Hello(http.HttpServlet): > def doGet(req, res): > res.setContentType("text/html") > out = res.getWriter() > out.println("<html><head><title>Hello World!</title></head>") > out.println("<body><h1>Hello World!</h1></body></html>") > > >Another suspicion is the classpath when you compile. Last I checked, you >can compile something like above _without_ javax.servlet in the >classpath and with no compile errors. However, at runtime you get a NPE, >so you need to make sure javax.servlet.*... is in the classpath rather >than relying on compile time errors to remind you (I don't remember the >original post though, so this may not apply.) > > > > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> > > >It's hard to tell without the servlet file, but make sure the file > Hello.py > > >has a single class called 'Hello' that extends from HttpServlet: > >I think there can be more than one class. If you have multiple classes >in the file, the servlet class (the subclass of HttpServlet) should be the >same name as the file. > >Cheers, >Robert > > > > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Robert W. B. <rb...@di...> - 2001-03-13 15:05:31
|
On Tue, 13 Mar 2001, Eduardo Jesus Fernandez Corrales wrote: > > Sure, there it goes. > > I am posting the generated file too, in case someone wants to check if it runs. "*" in import, Hmmmmmm. I tried the following with success... #spare imports removed and "*" replace with explicit package name from javax.servlet import http # prefix superclass with explicit package name "http." class Hello(http.HttpServlet): def doGet(req, res): res.setContentType("text/html") out = res.getWriter() out.println("<html><head><title>Hello World!</title></head>") out.println("<body><h1>Hello World!</h1></body></html>") Another suspicion is the classpath when you compile. Last I checked, you can compile something like above _without_ javax.servlet in the classpath and with no compile errors. However, at runtime you get a NPE, so you need to make sure javax.servlet.*... is in the classpath rather than relying on compile time errors to remind you (I don't remember the original post though, so this may not apply.) > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> > >It's hard to tell without the servlet file, but make sure the file Hello.py > >has a single class called 'Hello' that extends from HttpServlet: I think there can be more than one class. If you have multiple classes in the file, the servlet class (the subclass of HttpServlet) should be the same name as the file. Cheers, Robert |
From: brian z. <bz...@zi...> - 2001-03-13 14:49:55
|
This works for me: #from javax.servlet import * from javax.servlet.http import HttpServlet #from java.io import * class Hello(HttpServlet): def doGet(self, req, res): res.setContentType("text/html") out =3D res.getWriter() out.println("<html><head><title>Hello World!</title></head>") out.println("<body><h1>Hello World!</h1></body></html>") Notice I added 'self' to doGet() as it's an instance method. Also, be=20 careful with the from xx import * notation as it's not really recommended. Save all this in= =20 a file called Hello.py and it should work. brian At 03:14 PM 3/13/2001 +0100, Eduardo Jesus Fernandez Corrales wrote: >Sure, there it goes. > >I am posting the generated file too, in case someone wants to check if it= =20 >runs. > >Thanks. > > > > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> > >It's hard to tell without the servlet file, but make sure the file= Hello.py > >has a single class called 'Hello' that extends from HttpServlet: > > > >class Hello(HttpServlet): > > ... > > > >Could you post the servlet code as this would help tremendously. > > > >hope this helps, > > > >brian > >-- >Eduardo J. Fern=E1ndez Corrales > > |
From: Eduardo J. F. C. <EFE...@sa...> - 2001-03-13 14:15:39
|
Sure, there it goes. I am posting the generated file too, in case someone wants to check if it = runs. Thanks. > >>> "brian zimmer" <bz...@zi...> 13/03/01 14:10 >>> >It's hard to tell without the servlet file, but make sure the file = Hello.py >has a single class called 'Hello' that extends from HttpServlet: > >class Hello(HttpServlet): > ... > >Could you post the servlet code as this would help tremendously. > >hope this helps, > >brian -- Eduardo J. Fern=E1ndez Corrales |
From: brian z. <bz...@zi...> - 2001-03-13 13:13:18
|
It's hard to tell without the servlet file, but make sure the file Hello.= py has a single class called 'Hello' that extends from HttpServlet: class Hello(HttpServlet): ... Could you post the servlet code as this would help tremendously. hope this helps, brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...]On Behalf Of Eduardo > Jesus Fernandez Corrales > Sent: Tuesday, March 13, 2001 3:43 AM > To: jyt...@li... > Subject: [Jython-users] compiled servlet does not run > > > Hello everyone: > > I am trying to run a compiled servlet written in Jython. Here's > what I have done > > - I have installed Jython 2.0 in windows NT workstation with > servicepack 6, using java 1.2.2 > - Wrote the servlet in file Hello.py. This is the usual simple > servlet that just prints hello world > - Compiled the servlet with jythonc. I get some deprecation > warnings but the Hello.class file gets generated. > - Moved the .class to the servlet directory (Other servlets like > IsItWorkign run fine. This is Apache 1.3.6 with Jserv 1.0) > - Tried to run the servlet. The browser just hangs there and I > get a timeout > > Looking at the apache logs I get this in the error.log file: > > Java Traceback: > > at org.python.core.Py.AttributeError(Py.java:90) > at org.python.core.PyObject.__getattr__(PyObject.java:672) > at org.python.core.Py.initProxy(Py.java, Compiled Code) > at Hello.<init>(Hello.java:141) > at java.lang.Class.newInstance0(Native Method) > at java.lang.Class.newInstance(Class.java, Compiled Code) > at > org.apache.jserv.JServServletManager.load_init(JServServletManager.java= ) > at > org.apache.jserv.JServServletManager.loadServlet(JServServletManager.ja= va) > at > org.apache.jserv.JServConnection.processRequest(JServConnection.java) > at org.apache.jserv.JServConnection.run(JServConnection.java) > at java.lang.Thread.run(Thread.java:479) > Traceback (innermost last): > (no code object) at line 0 > AttributeError: class 'Hello' has no attribute 'Hello' > > What could be the problem? > > Thanks in advance. > > > -- > Eduardo J. Fern=E1ndez Corrales > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Eduardo J. F. C. <EFE...@sa...> - 2001-03-13 09:45:09
|
Hello everyone: I am trying to run a compiled servlet written in Jython. Here's what I = have done - I have installed Jython 2.0 in windows NT workstation with servicepack = 6, using java 1.2.2 - Wrote the servlet in file Hello.py. This is the usual simple servlet = that just prints hello world - Compiled the servlet with jythonc. I get some deprecation warnings but = the Hello.class file gets generated. - Moved the .class to the servlet directory (Other servlets like IsItWorkig= n run fine. This is Apache 1.3.6 with Jserv 1.0) - Tried to run the servlet. The browser just hangs there and I get a = timeout Looking at the apache logs I get this in the error.log file: Java Traceback: at org.python.core.Py.AttributeError(Py.java:90) at org.python.core.PyObject.__getattr__(PyObject.java:672) at org.python.core.Py.initProxy(Py.java, Compiled Code) at Hello.<init>(Hello.java:141) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java, Compiled Code) at org.apache.jserv.JServServletManager.load_init(JServServletManag= er.java) at org.apache.jserv.JServServletManager.loadServlet(JServServletMan= ager.java) at org.apache.jserv.JServConnection.processRequest(JServConnection.= java) at org.apache.jserv.JServConnection.run(JServConnection.java) at java.lang.Thread.run(Thread.java:479) Traceback (innermost last): (no code object) at line 0 AttributeError: class 'Hello' has no attribute 'Hello' What could be the problem? Thanks in advance. -- Eduardo J. Fern=E1ndez Corrales |
From: John H. <jo...@ne...> - 2001-03-13 05:53:48
|
All, The following script runs in python, but not jython: import shelve subd = { "hula":"hoop", "sevenof":9 } d = shelve.open( "dictfile" ) d["hoop"] = "skirt" d["polo"] = "pony" d["subber"] = subd d.close() d = shelve.open( "dictfile" ) print d["subber"] This is the output from the jython run: jython.bat shelvetest.py Traceback (innermost last): File "shelvetest.py", line 4, in ? File "e:\Jython\Lib\shelve.py", line 157, in open File "e:\Jython\Lib\shelve.py", line 147, in __init__ File "e:\Jython\Lib\anydbm.py", line 71, in open ImportError: no module named whichdb whichdb.py is not in the the jython distribution so I borrowed the one from python. That eventually led to other problems (which I omit here). What is the best strategy for getting shelve to work? Thanks (again) John |
From: Benjamin C. <bc...@cs...> - 2001-03-12 21:57:47
|
So, say I've got a java class A, and a "subclass" B done in jython. Should I be able to do the following in a java program: A a = null; Class c (previously initialized to have an instance of B); a = (A) c.newInstance(); If not, why not? Thanks Ben |
From: syKim <re...@ne...> - 2001-03-12 18:03:00
|
Sorry.. I forgot that attach file. :) |
From: syKim <re...@ne...> - 2001-03-12 14:31:26
|
Thank you for your regard, Ype I attached simple DnD source in java. It just display .txt, .java file in EditBox but, I guess it's nice example. then, make reference to this site... http://java.sun.com/products/javabeans/glasgow/dnd.pdf : Proposal for a DnD subsystem for JFC http://java.sun.com/j2se/1.3/docs/api/java/awt/dnd/package-summary.html : java.awt.dnd package description I expect good news.. Happy Python :) |