You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(38) |
Nov
(98) |
Dec
(58) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(114) |
Feb
(123) |
Mar
(96) |
Apr
(66) |
May
(84) |
Jun
(72) |
Jul
(128) |
Aug
(126) |
Sep
(82) |
Oct
(80) |
Nov
(148) |
Dec
(55) |
| 2002 |
Jan
(137) |
Feb
(85) |
Mar
(118) |
Apr
(67) |
May
(71) |
Jun
(28) |
Jul
(69) |
Aug
(48) |
Sep
(83) |
Oct
(79) |
Nov
(54) |
Dec
(32) |
| 2003 |
Jan
(44) |
Feb
(47) |
Mar
(59) |
Apr
(57) |
May
(43) |
Jun
(45) |
Jul
(44) |
Aug
(39) |
Sep
(27) |
Oct
(62) |
Nov
(17) |
Dec
(23) |
| 2004 |
Jan
(41) |
Feb
(51) |
Mar
(38) |
Apr
(30) |
May
(25) |
Jun
(12) |
Jul
(11) |
Aug
(27) |
Sep
(16) |
Oct
(56) |
Nov
(23) |
Dec
(29) |
| 2005 |
Jan
(75) |
Feb
(82) |
Mar
(50) |
Apr
(77) |
May
(19) |
Jun
(104) |
Jul
(47) |
Aug
(42) |
Sep
(28) |
Oct
(143) |
Nov
(62) |
Dec
(13) |
| 2006 |
Jan
(20) |
Feb
(10) |
Mar
(59) |
Apr
(45) |
May
(25) |
Jun
(129) |
Jul
(162) |
Aug
(91) |
Sep
(15) |
Oct
(39) |
Nov
(186) |
Dec
(191) |
| 2007 |
Jan
(134) |
Feb
(140) |
Mar
(106) |
Apr
(77) |
May
(92) |
Jun
(63) |
Jul
(233) |
Aug
(102) |
Sep
(119) |
Oct
(63) |
Nov
(68) |
Dec
(32) |
| 2008 |
Jan
(69) |
Feb
(91) |
Mar
(129) |
Apr
(44) |
May
(18) |
Jun
(53) |
Jul
(50) |
Aug
(25) |
Sep
(11) |
Oct
(28) |
Nov
(67) |
Dec
(36) |
| 2009 |
Jan
(20) |
Feb
(24) |
Mar
(66) |
Apr
(53) |
May
(48) |
Jun
(48) |
Jul
(59) |
Aug
(82) |
Sep
(49) |
Oct
(30) |
Nov
(16) |
Dec
(16) |
| 2010 |
Jan
(52) |
Feb
(25) |
Mar
(36) |
Apr
(34) |
May
(14) |
Jun
(15) |
Jul
(14) |
Aug
(16) |
Sep
(23) |
Oct
(6) |
Nov
(4) |
Dec
(5) |
| 2011 |
Jan
(4) |
Feb
(22) |
Mar
(45) |
Apr
(9) |
May
(8) |
Jun
(13) |
Jul
(12) |
Aug
(4) |
Sep
(6) |
Oct
(10) |
Nov
(21) |
Dec
(5) |
| 2012 |
Jan
(6) |
Feb
(9) |
Mar
(25) |
Apr
(6) |
May
(4) |
Jun
(23) |
Jul
(6) |
Aug
(18) |
Sep
(21) |
Oct
(34) |
Nov
(19) |
Dec
(25) |
| 2013 |
Jan
(8) |
Feb
(34) |
Mar
(35) |
Apr
(4) |
May
(11) |
Jun
(4) |
Jul
(7) |
Aug
(5) |
Sep
(20) |
Oct
(12) |
Nov
(11) |
Dec
(7) |
| 2014 |
Jan
(10) |
Feb
(18) |
Mar
(50) |
Apr
(26) |
May
(53) |
Jun
(21) |
Jul
(12) |
Aug
(39) |
Sep
(43) |
Oct
(26) |
Nov
(8) |
Dec
(6) |
| 2015 |
Jan
(18) |
Feb
(32) |
Mar
(31) |
Apr
(42) |
May
(38) |
Jun
(13) |
Jul
(6) |
Aug
(11) |
Sep
(29) |
Oct
(25) |
Nov
(10) |
Dec
(11) |
| 2016 |
Jan
(24) |
Feb
(12) |
Mar
(13) |
Apr
(15) |
May
(22) |
Jun
(8) |
Jul
(12) |
Aug
(25) |
Sep
(8) |
Oct
(6) |
Nov
(13) |
Dec
(7) |
| 2017 |
Jan
(6) |
Feb
(29) |
Mar
(32) |
Apr
(8) |
May
(82) |
Jun
(42) |
Jul
(20) |
Aug
(17) |
Sep
(27) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
| 2018 |
Jan
(12) |
Feb
(9) |
Mar
(22) |
Apr
(19) |
May
(14) |
Jun
(9) |
Jul
(9) |
Aug
(22) |
Sep
(22) |
Oct
(12) |
Nov
(13) |
Dec
(8) |
| 2019 |
Jan
(22) |
Feb
(3) |
Mar
(30) |
Apr
(20) |
May
(20) |
Jun
(6) |
Jul
(15) |
Aug
(25) |
Sep
(11) |
Oct
(24) |
Nov
(11) |
Dec
(6) |
| 2020 |
Jan
(9) |
Feb
(12) |
Mar
(29) |
Apr
(10) |
May
(22) |
Jun
(11) |
Jul
(15) |
Aug
(5) |
Sep
(6) |
Oct
(7) |
Nov
(7) |
Dec
(13) |
| 2021 |
Jan
(21) |
Feb
(5) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(7) |
Jul
(6) |
Aug
(8) |
Sep
(5) |
Oct
(9) |
Nov
(5) |
Dec
(6) |
| 2022 |
Jan
(5) |
Feb
(4) |
Mar
(8) |
Apr
(6) |
May
(5) |
Jun
(5) |
Jul
(10) |
Aug
(6) |
Sep
(7) |
Oct
(4) |
Nov
(4) |
Dec
(6) |
| 2023 |
Jan
(5) |
Feb
(5) |
Mar
(6) |
Apr
(4) |
May
(5) |
Jun
(6) |
Jul
(5) |
Aug
(5) |
Sep
(5) |
Oct
(5) |
Nov
(7) |
Dec
(8) |
| 2024 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
(1) |
Aug
(4) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2025 |
Jan
|
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2026 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <bc...@wo...> - 2001-02-19 10:25:27
|
[brian]
>I have implemented a few extension modules in Java to be used in the Jython
>runtime. I have a good feel for most of the requirements of doing such
>except for the area of exceptions. I have seen a couple different ways to
>create and raise exceptions and I wanted to know if there was a standard, or
>least best practices approach.
>
>I've noticed that Py.java and Finn's cPickle module have written the
>exception class hierarchy in Python (as opposed to Java) and then used
>jpythonc to produce the classes so they would be available in Java. I've
>never felt comfortable checking in generated source.
I didn't feel good about it either. It was a hack needed to get
Jython-2.0 finished. At the time I had spend way too much time trying to
get jython exceptions right, and I needed something that just plain
worked.
>On the other hand, some modules, mine included, have used a static PyString
>and use PyException's constructor to make the exception. This seems weak to
>me as I'm not really subclassing the exception, just giving it a type. I'd
>rather have a more OO feel by subclassing the exception, but I haven't seen
>this done anywhere except for PySyntaxError.
>
>I'm opened to any ideas. I am partial to subclassing PyException as this
>seems the most correct, but since so few examples exist of such being done
>I'd like to find out why? I think the Py.makeException() methods would be
>useful but they don't allow the specification of a superclass.
>
>Anyways, sorry to ramble, but I've been confused about exceptions in Jython
>for some time.
So have I. In errata-06 I coded all the standard exceptions as java
classes. The base Exception then became:
public static class Exception extends PyObject {
public static String __doc__ =
"Base class for all standard Python exceptions.";
public PyObject[] args;
public Exception(PyObject[] args) {
this.args = args;
}
public PyString __str__() {
switch (args.length) {
case 0:
return Py.newString("");
case 1:
return args[0].__str__();
default:
return (new PyTuple(args)).__str__();
}
}
public PyObject __getitem__(int i) {
return args[i];
}
public String toString() {
return __str__().toString();
}
}
which is a straightforward conversion from the python exceptions.py
module. Making application specific subclasses from java is equally
straightforward. The cPickle.java source still contains examples of this
as comments.
However this had some drawbacks because exceptions.Exception is then a
python type:
1. types can not control how the class is printed, only how the
instances are printed. As a result the exception name was written
as "org.python.core.NameError".
2. we can not make multiple inheritance of types.
Both these drawbacks are avoided when the exceptions.Exception is a
python class. Bases on this experience from errata-06 I decided it was
better when exceptions.Exception is a python class.
The drawbacks of this decision is the total lack of an java API with
which to create python classes. I'm working on a way to make python
classes from within java a little easier. The details are not finalized
yet, but the general mechanism is that the PyClass is created with:
buildClass(dict, "EnvironmentError", "StandardError",
"EnvironmentError",
"Base class for I/O related errors.");
where the arguments are
- module dict
- classname
- superclassname
- name of class code method
- doc string
The "name of class code method" must be a java method which create and
populate the class dict:
public static PyObject EnvironmentError() {
PyObject dict = passCode(null);
dict.__setitem__("__init__",
getJavaFunc("EnvironmentError__init__"));
dict.__setitem__("__str__",
getJavaFunc("EnvironmentError__str__"));
return dict;
}
and the class functions are java method that implements the desired
functionally:
public static void EnvironmentError__init__(PyObject[] arg) {
ArgParser ap = new ArgParser("search", arg, null,
"self", "args");
PyObject self = ap.getPyObject(0);
PyObject args = ap.getList(1);
self.__setattr__("args", args);
self.__setattr__("errno", Py.None);
self.__setattr__("strerror", Py.None);
self.__setattr__("filename", Py.None);
if (args.__len__() == 3) {
// open() errors give third argument which is the filename.
// BUT, so common in-place unpacking doesn't break, e.g.:
//
// except IOError, (errno, strerror):
//
// we hack args so that it only contains two items. This
// also means we need our own __str__() which prints out the
// filename when it was supplied.
PyObject[] tmp = Py.unpackSequence(args, 3);
self.__setattr__("errno", tmp[0]);
self.__setattr__("strerror", tmp[1]);
self.__setattr__("filename", tmp[2]);
self.__setattr__("args",
args.__getslice__(Py.Zero, Py.newInteger(2
}
if (args.__len__() == 2) {
// common case: PyErr_SetFromErrno()
PyObject[] tmp = Py.unpackSequence(args, 2);
self.__setattr__("errno", tmp[0]);
self.__setattr__("strerror", tmp[1]);
}
}
Again this java code is a 1-to-1 match with the python code from
exceptions.py. We can then avoid having generated code in the codebase.
This kind of API support is about the same that CPython have for this
task.
Still, I agree that it is a lot of complicated code when all a module
writer want to do is:
class MyExc(Exception):
def __str__(self):
return ...
regards,
finn
|
|
From: brian z. <bz...@zi...> - 2001-02-19 02:44:24
|
I have implemented a few extension modules in Java to be used in the Jython runtime. I have a good feel for most of the requirements of doing such except for the area of exceptions. I have seen a couple different ways to create and raise exceptions and I wanted to know if there was a standard, or least best practices approach. I've noticed that Py.java and Finn's cPickle module have written the exception class hierarchy in Python (as opposed to Java) and then used jpythonc to produce the classes so they would be available in Java. I've never felt comfortable checking in generated source. On the other hand, some modules, mine included, have used a static PyString and use PyException's constructor to make the exception. This seems weak to me as I'm not really subclassing the exception, just giving it a type. I'd rather have a more OO feel by subclassing the exception, but I haven't seen this done anywhere except for PySyntaxError. I'm opened to any ideas. I am partial to subclassing PyException as this seems the most correct, but since so few examples exist of such being done I'd like to find out why? I think the Py.makeException() methods would be useful but they don't allow the specification of a superclass. Anyways, sorry to ramble, but I've been confused about exceptions in Jython for some time. thanks, brian |
|
From: Ype K. <yk...@xs...> - 2001-02-17 08:14:55
|
>I desperatly need the webbrowser module (all the internet support modules >would be nice too) to be ported to jython ...could you please help me ? To avoid porting check these out: http://sourceforge.net/projects/jpe in alpha status, and: http://web.one.net.au/~effbiae/cyphon.html still in pre-alpha stage. Good luck, Ype |
|
From: Francois P. <fr...@yo...> - 2001-02-17 03:11:49
|
I desperatly need the webbrowser module (all the internet support modules would be nice too) to be ported to jython ...could you please help me ? Thanks for all the good work -Frank Pham |
|
From: <bc...@wo...> - 2001-02-16 18:13:29
|
[Peter Maxwell]
>I didn't find any mention of this on the Jython vs CPython page or in
>the list archive so FYI:
>
> $ python
>Python 2.0 (#4, Dec 7 2000, 22:16:55)
>[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
>Type "copyright", "credits" or "license" for more information.
>>>> getattr("a", "b", "c")
>'c'
>
>but:
>
> $ jython
>Jython 2.0 on java1.3.0 (JIT: null)
>Type "copyright", "credits" or "license" for more information.
>>>> getattr("a", "b", "c")
>Traceback (innermost last):
> File "<console>", line 1, in ?
>TypeError: getattr(): expected 2 args; got 3
Thanks for the report. This oversight have been added to the CVS.
regards,
finn
|
|
From: Peter M. <ma...@en...> - 2001-02-16 06:40:03
|
I didn't find any mention of this on the Jython vs CPython page or in
the list archive so FYI:
$ python
Python 2.0 (#4, Dec 7 2000, 22:16:55)
[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> getattr("a", "b", "c")
'c'
but:
$ jython
Jython 2.0 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> getattr("a", "b", "c")
Traceback (innermost last):
File "<console>", line 1, in ?
TypeError: getattr(): expected 2 args; got 3
-- Peter Maxwell
|
|
From: <ma...@la...> - 2001-02-15 14:27:52
|
Didier Assandri <Did...@da...> said: > I'm currently investigation Python (i.e. Jython) as prototyping tool for OO > programming. Jython looks good for Java, but is there a way to have a > graphical environament ala IDLE to develop with JAVA. We've got so used to > click, cut & paste and so on, that I almost can no longer work on command > line. This is starting to become a FAQ... I think it's time for all of us who care about this to get together and make sure there's a solid solution for it. After all, that's what the open source model is supposed to let us do. I know someone has had some success getting Finn's jtkinter working with a recent version of Jython. That should allow IDLE to run, although it may not be the "best answer". When I asked on idle-dev, though, I got the reply that IDLE itself is not written in an especially gui-independent manner, so ripping it out and replacing it with Java-based code (Swing, presumably) did not seem a trivial task. There are some other options...perhaps to start building more IDE-type support into the "console" application that now exists. Mats |
|
From: Didier A. <Did...@da...> - 2001-02-15 14:17:57
|
I'm currently investigation Python (i.e. Jython) as prototyping tool for OO programming. Jython looks good for Java, but is there a way to have a graphical environament ala IDLE to develop with JAVA. We've got so used to click, cut & paste and so on, that I almost can no longer work on command line. Thanks, Didier Assandri Manager ITAP/ICIN -------------------------------------------------------- Danzas Management Ltd Corporate Information Technology P.O. Box CH-4002 Basel Switzerland http://www.danzas.com !! Please note new Email address below!!! did...@da... direct phone: +41/61/274 79 20 direct fax: +41/61/274 79 76 X400: C=ch;A=atlas;P=danzas;O=dzchbslho;S=assandri;G=didier |
|
From: <bc...@wo...> - 2001-02-15 12:44:45
|
[Andy] >The Jrockit eval version I'm using provides >just 2 files: jrockit.exe and jvm.dll (the simpler, >the better, if you ask me). jrockit.exe >replaces java.exe. > >Running jython I get the following error: > >Traceback (innermost last): > File "d:\Program Files\jython-2.0\Lib\site.py", line 66, in ? >AttributeError: module 'sys' has no attribute 'modules' > >To those knowledgeable perhaps you can tell >in an instant whether the culprit is Jrockit >or possibly something overlooked in Jython? I can't say anything definite based only on this. The sys.modules attribute is found by reflection of the PySystemState class. If that for some reason fails to work on jrockit, very little of jython will work. Try to skip the site.py for now by specifying the -S option. If that allow Jython to start, try to see how much of the java world that is available to jrockit: i:\>jython -S Jython 2.0 on java1.3.0 (JIT: null) >>> import java >>> java.lang.Class.getMethods <java function getMethods at 3784296> >>> len(java.lang.Class.getMethods(java.lang.Number)) 15 >>> java.lang.Class.getMethods(java.lang.Number) array([public native int java.lang.Object.hashCode(), ....], java.lang.reflect.Method) >>> >I think Jython and specifically running pybench >under Jython would make for a pretty informative >real-world benchmark of the performance of the >different JVMs. Indeed. Keep in mind that the adaptive JVMs makes it hard to measure a benchmark. Very few python benchmarks are designed for an environment where each run through the program is a little faster than the previous one. The fine pybench: http://www.lemburg.com/files/python/Introduction.html is both very usefull and totally useless. When used for its purpose (tweaking a python implementation) it is great, but it can't be trusted as a benchmark of java VMs. - It only shows how well the JVM handles a jython usage pattern. F.ex calls of reflected methods are not that common outside script languages like jython. - There are given no weights to the different tests. A slow attribute lookup may (or may not depending on the application) hurt more than a slow string concatination. As always, use benchmarks with care. OTOH I would dearly like to see the results of your pybench benchmarks. The -f and -c options are usefull for this. regards, finn |
|
From: Andy <an...@mi...> - 2001-02-15 03:38:07
|
The Jrockit eval version I'm using provides just 2 files: jrockit.exe and jvm.dll (the simpler, the better, if you ask me). jrockit.exe replaces java.exe. Running jython I get the following error: Traceback (innermost last): File "d:\Program Files\jython-2.0\Lib\site.py", line 66, in ? AttributeError: module 'sys' has no attribute 'modules' To those knowledgeable perhaps you can tell in an instant whether the culprit is Jrockit or possibly something overlooked in Jython? I think Jython and specifically running pybench under Jython would make for a pretty informative real-world benchmark of the performance of the different JVMs. So far I've managed to get pybench.py under Jython to run with Sun's JDK 1.3 and IBM's JDK 1.3 (part of Websphere) and non-translated jcode under Elate/AmigaSDK. Fastest is Sun with average of 50+ seconds, then IBM at around 70-80 seconds and as expected jcode is slowest at well above 100 seconds but then it should be translated to observe the true power of Elate's Java implementation. However, translation failed and i have to do some serious study both of Jython and the Elate Java environment to get it to work. Jython rocks! Keep up the good work. |
|
From: Robert W. B. <rb...@di...> - 2001-02-14 15:02:47
|
> [Robert] > >On an unrelated note, module global variables are common in the Jython > >world. Is there an advantage to PyServlet if each servlet has it's own > >namespace to accomodate this? > > [Finn] > > Well, is there an advantage? I considered it when I added PyServlet to > > the repository, but for smallish apps, the application namespace is an > > advantage IMHO. For larger apps, the application probably have to deal > > with more controlled namespaces anyway. > > [Robert] > >Very true about the namespaces. I'm not sure about > >advantages, but currently module globals work- until another PyServlet > >tramples them. This seemed in need of a fix. > > Each deployed PyServlet class have each own namespace (stored in > PythonInterpreter.locals). It is the .py files stored under the same > <context> that share the same globals namespace. Sorry for the confusion. As noted in my reply to David, my use of PyServlet was wrong. Before PyServlet, I used a java class called PyMapping, and referred to the .py files as the PyServlets. This lingo has created the confusion. Above, PyServlet was meant as .py file. > >The choices looked like > >disallowing globals, or adding individual namespaces, > > In addition to the shared globals, each .py servlet already have its own > namespace available from within the doXXX() and service() methods as > self.__dict__. Yes, that's assumed. The question was whether python users expect safe module globals in Jython applications. My guess was that they would, but it sounds like I'm mistaken. > >This depends on whether adding the unique namespaces was thought to be a > >good thing to begin with. If not, it doesn't matter. If so, > >implementing them looked like one of three options: > > > >1. an interpreter instance per PyServlet- overkill? > > Done already. Again, meant as .py file - sorry. > >2. extract and insert servlet and namespace into and from the interpreter > >for each request- messy? > > The implementation wouldn't be messy. The interp.execfile() call in > loadServlet should instead be done as a > > PyObject ns = new PyStringMap() > __builtin__.execfile(path, ns, ns) > > The request handling will then automaticly use this namespace when the > py service method is called from PyServlet.service(). > > >3. execute the file, class, and servlet methods with Py.exec methods- > >visually appealing, but not common practice, maybe for a > >reason I thought :) > > Each Py.exec (and execfile) cause a classload. That should be avoided > unless absolutely necessary. Very useful to know- thank you. -Robert |
|
From: Robert W. B. <rb...@di...> - 2001-02-14 14:50:23
|
Hi David, On Wed, 14 Feb 2001, David Syer wrote: > > -----Original Message----- > > From: Robert W. Bill [mailto:rb...@di...] > > Sent: 14 February 2001 02:45 > > To: jyt...@li... > > > 1. an interpreter instance per PyServlet- overkill? > > 2. extract and insert servlet and namespace into and from the interpreter > > for each request- messy? > > 3. execute the file, class, and servlet methods with Py.exec methods- > > visually appealing, but not common practice, maybe for a > > reason I thought :) > > > I'm sure there's a better way that I'm missing though. > > Again I think people are trying to make this more complicated than it needs > to be. In fact the Java classloading 'problem' that was discussed earlier > this week is the best solution to the namespace problem. I think all you > need to do is make a separate web-app for each namespace you need. I can't > think of why you'd want to break the python namespace convention within an > app. If that is wrong, please explain. Sorry about the confusion. Before PyServlet.class was a part of the util package, I was using my own tool called PyMapping, and referred to the .py files as PyServlets. My own invented lingo has created the confusion between PyServlet and .py files- sorry. The module global namespace of the .py files within a single webapp is what I meant to say for each reference to "PyServlet". No, I'm not trying to break the python namespace. Python namespace convention would be that a module global var named "foo" could be used in multiple modules safely as it would be unique to those modules. PyServlet treats all .py file's module globals as in a single namespace- *not* like python namespace convention. The idea was to fix namespaces to work as python folk expect them to work- module globals are safe in Python, why not in python servlets? Admittedly, this sense of convention may be the only advantage. Nobody on the lists sees it as valuable, I don't need it, and I just thought it would be nice if it was more like python. Not a big deal either way. -Robert |
|
From: <bc...@wo...> - 2001-02-14 10:12:41
|
[George K. Thiruvathukal] >This happens: >Exception in thread "main" Traceback (innermost last): > File "<string>", line 1, in ? > File "/webhome/servlets/gkt/WEB-INF/classes/./Test2app.py", line 10, in ? >java.lang.ExceptionInInitializerError: java.lang.NullPointerException > at org.python.modules.os.<clinit>(os.java:11) This is a little stupid bug I introduced in org.python.module.os. It occur when sys.prefix is null and that can happen when jython is embedded and compiled with jythonc. As you have seen, setting python.home prevents the exception. The bug is fixed in the CVS. regards, finn |
|
From: <bc...@wo...> - 2001-02-14 10:12:11
|
[Robert] >On an unrelated note, module global variables are common in the Jython >world. Is there an advantage to PyServlet if each servlet has it's own >namespace to accomodate this? [Finn] > Well, is there an advantage? I considered it when I added PyServlet to > the repository, but for smallish apps, the application namespace is an > advantage IMHO. For larger apps, the application probably have to deal > with more controlled namespaces anyway. [Robert] >Very true about the namespaces. I'm not sure about >advantages, but currently module globals work- until another PyServlet >tramples them. This seemed in need of a fix. Each deployed PyServlet class have each own namespace (stored in PythonInterpreter.locals). It is the .py files stored under the same <context> that share the same globals namespace. >The choices looked like >disallowing globals, or adding individual namespaces, In addition to the shared globals, each .py servlet already have its own namespace available from within the doXXX() and service() methods as self.__dict__. >... >This depends on whether adding the unique namespaces was thought to be a >good thing to begin with. If not, it doesn't matter. If so, >implementing them looked like one of three options: > >1. an interpreter instance per PyServlet- overkill? Done already. >2. extract and insert servlet and namespace into and from the interpreter >for each request- messy? The implementation wouldn't be messy. The interp.execfile() call in loadServlet should instead be done as a PyObject ns = new PyStringMap() __builtin__.execfile(path, ns, ns) The request handling will then automaticly use this namespace when the py service method is called from PyServlet.service(). >3. execute the file, class, and servlet methods with Py.exec methods- >visually appealing, but not common practice, maybe for a >reason I thought :) Each Py.exec (and execfile) cause a classload. That should be avoided unless absolutely necessary. regards, finn |
|
From: <bc...@wo...> - 2001-02-14 09:17:07
|
[Brian Zhou] >I figured it out. To answer myself: > > Currently in PyServlet.java, setting "python.home" in WEB-INF/web.xml >and the following code are MUTUALLY EXCLUSIVE! >... >Will it do any harm if we set pyservlet properties independent of >"python.home"? No. It was just the result of thoughless cut&paste. Now fixed in the CVS. regards, finn |
|
From: David S. <ds...@al...> - 2001-02-14 07:49:00
|
> -----Original Message----- > From: Robert W. Bill [mailto:rb...@di...] > Sent: 14 February 2001 02:45 > To: jyt...@li... > 1. an interpreter instance per PyServlet- overkill? > 2. extract and insert servlet and namespace into and from the interpreter > for each request- messy? > 3. execute the file, class, and servlet methods with Py.exec methods- > visually appealing, but not common practice, maybe for a > reason I thought :) > I'm sure there's a better way that I'm missing though. Again I think people are trying to make this more complicated than it needs to be. In fact the Java classloading 'problem' that was discussed earlier this week is the best solution to the namespace problem. I think all you need to do is make a separate web-app for each namespace you need. I can't think of why you'd want to break the python namespace convention within an app. If that is wrong, please explain. Dave. |
|
From: Brian Z. <bri...@ya...> - 2001-02-14 07:08:33
|
I figured it out. To answer myself:
Currently in PyServlet.java, setting "python.home" in WEB-INF/web.xml
and the following code are MUTUALLY EXCLUSIVE!
"""
props.setProperty("python.home", rootPath + File.separator +
"WEB-INF" + File.separator +
"lib");
props.setProperty("python.packages.directories",
"java.ext.dirs,pyservlet.lib");
props.setProperty("pyservlet.lib",
rootPath + File.separator +
"WEB-INF" + File.separator +
"lib");
props.setProperty("python.packages.paths",
"java.class.path,sun.boot.class.path,"+
"pyservlet.classes");
props.setProperty("pyservlet.classes",
rootPath + File.separator +
"WEB-INF" + File.separator +
"classes");
"""
I kind of understand the reasoning behind this: make deployment
self-contained. But setting "python.home" to <context>/WEB-INF/lib really
makes development inconvenient (any module except sys need to be copied into
WEB-INF/lib).
Will it do any harm if we set pyservlet properties independent of
"python.home"?
/Brian
----- Original Message -----
From: "Brian Zhou" <bri...@ya...>
To: <jyt...@li...>
Sent: Tuesday, February 13, 2001 9:58 PM
Subject: Re: [Jython-dev] Re: WEB-INF/classes & WEB-INF/lib/*.jar
inaccessible in jython servlet
> Hi Finn,
>
> Thanks for explaining to me that I need to put jython.jar under
> <context>/WEB-INF/lib. I did cvs update and rebuilt jython.jar. Now it's
> working with the help of:
>
> import sys
> sys.add_package("testpkg")
> from testpkg import TestClass
>
> But without the above, it still complains:
>
> File "C:\devel\servletContext\test\hello.py", line 3, in ?
> ImportError: no module named testpkg
>
> Is this the expected behavior so far? BTW, sys.registry.list(out) shows
>
> python.packages.paths=java.class.path, sun.boot.class.path
> python.packages.directories=java.ext.dirs
> ...
>
> No pyservlet.* in sight. Did I miss anything, again?
>
> Really appreciate all your help,
>
> /Brian
>
> ----- Original Message -----
> From: "Finn Bock" <bc...@wo...>
> To: <jyt...@li...>
> Sent: Tuesday, February 13, 2001 1:56 AM
> Subject: Re: [Jython-dev] Re: WEB-INF/classes & WEB-INF/lib/*.jar
> inaccessible in jython servlet
>
>
> >
> > PyServlet will get the logic for free from the classloader that loaded
> > jython.jar (but only when jython.jar is loaded from
> > <context>/WEB-INF/lib). What we need to add is only the inspection of
> > classes and jars found on ../lib and ../classes. The actual classloading
> > magic is already handled by tomcat's servlet context logic.
> >
> > > I didn't test JSP, but I believe it should be the same as servlet.
> >
> > I have added this to PyServlet:
> >
> > props.setProperty("python.packages.directories",
> > "java.ext.dirs,pyservlet.lib");
> > props.setProperty("pyservlet.lib",
> > rootPath + File.separator +
> > "WEB-INF" + File.separator +
> > "lib");
> >
> > props.setProperty("python.packages.paths",
> > "java.class.path,sun.boot.class.path,"+
> > "pyservlet.classes");
> > props.setProperty("pyservlet.classes",
> > rootPath + File.separator +
> > "WEB-INF" + File.separator +
> > "classes");
> >
> > It seems to work, but I think we should have some kind of direct API for
> > this purpose.
> >
> > PySystemState.add_classpath(String directoryPath)
> > PySystemState.add_extdirs(String directoryPath)
> >
> > Any thoughs, Samuele?
> >
> > regards,
> > finn
> >
> >
> > _______________________________________________
> > Jython-dev mailing list
> > Jyt...@li...
> > http://lists.sourceforge.net/lists/listinfo/jython-dev
> >
>
>
> _______________________________________________
> Jython-dev mailing list
> Jyt...@li...
> http://lists.sourceforge.net/lists/listinfo/jython-dev
>
|
|
From: Brian Z. <bri...@ya...> - 2001-02-14 05:57:19
|
Hi Finn,
Thanks for explaining to me that I need to put jython.jar under
<context>/WEB-INF/lib. I did cvs update and rebuilt jython.jar. Now it's
working with the help of:
import sys
sys.add_package("testpkg")
from testpkg import TestClass
But without the above, it still complains:
File "C:\devel\servletContext\test\hello.py", line 3, in ?
ImportError: no module named testpkg
Is this the expected behavior so far? BTW, sys.registry.list(out) shows
python.packages.paths=java.class.path, sun.boot.class.path
python.packages.directories=java.ext.dirs
...
No pyservlet.* in sight. Did I miss anything, again?
Really appreciate all your help,
/Brian
----- Original Message -----
From: "Finn Bock" <bc...@wo...>
To: <jyt...@li...>
Sent: Tuesday, February 13, 2001 1:56 AM
Subject: Re: [Jython-dev] Re: WEB-INF/classes & WEB-INF/lib/*.jar
inaccessible in jython servlet
>
> PyServlet will get the logic for free from the classloader that loaded
> jython.jar (but only when jython.jar is loaded from
> <context>/WEB-INF/lib). What we need to add is only the inspection of
> classes and jars found on ../lib and ../classes. The actual classloading
> magic is already handled by tomcat's servlet context logic.
>
> > I didn't test JSP, but I believe it should be the same as servlet.
>
> I have added this to PyServlet:
>
> props.setProperty("python.packages.directories",
> "java.ext.dirs,pyservlet.lib");
> props.setProperty("pyservlet.lib",
> rootPath + File.separator +
> "WEB-INF" + File.separator +
> "lib");
>
> props.setProperty("python.packages.paths",
> "java.class.path,sun.boot.class.path,"+
> "pyservlet.classes");
> props.setProperty("pyservlet.classes",
> rootPath + File.separator +
> "WEB-INF" + File.separator +
> "classes");
>
> It seems to work, but I think we should have some kind of direct API for
> this purpose.
>
> PySystemState.add_classpath(String directoryPath)
> PySystemState.add_extdirs(String directoryPath)
>
> Any thoughs, Samuele?
>
> regards,
> finn
>
>
> _______________________________________________
> Jython-dev mailing list
> Jyt...@li...
> http://lists.sourceforge.net/lists/listinfo/jython-dev
>
|
|
From: Brian Z. <bri...@ya...> - 2001-02-14 04:38:18
|
Thanks Finn, the init(self, config=None) works pretty well. /Brian ----- Original Message ----- From: "Finn Bock" <bc...@wo...> To: <jyt...@li...> Sent: Tuesday, February 13, 2001 1:57 AM Subject: Re: [Jython-dev] jython servlet init() override problem > So the jython method must be prepared to handle both situations: > > def init(self, config=None): > if config: > HttpServlet.init(self, config) > pass > > Obviously jython is completely defeating the purpose of the > parameter-less init() method: > > """ > void init() > A convenience method which can be overridden so that there's no need > to call super.init(config). > """ > > In jython, we are forced to deal with both init() methods *and* we have > to call super.init() as well. > > regards, > finn > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-dev > |
|
From: Robert W. B. <rb...@di...> - 2001-02-14 00:37:44
|
On Tue, 13 Feb 2001, George K. Thiruvathukal wrote:
> This proved to be very helpful. Apparently, the import of 'os' was where
> things got tripped up, because the path was not correct.
>
> I have now tried to repeat the same experiment by writing everything in
> Python and using the jythonc/jython combination and running into the same
> problem. What is the proper way to get classes to load in this scenario?
path tools are:
1. python.path in registry
2. python.prepath in registry
3. python.home usually set on command line "java -Dpython.home=/path"
4. sys.path.append("/path") in program or autoloaded site.py
5. Freezing the required modules.
sys.path.append is equiv to what the registry python.path key does, and
the autoloaded site.py file does as well. It usually works unless the
sys.prefix is somehow off. Start with "java
-Dpython.home=/usr/local/jython-2.0 myApp", and maybe print sys.prefix and
sys.path to see what's up there. The python.prepath key in the registry
pre-pends the path to sys.path if that's what you need.
You can use the --deep --package commands with jythonc to freeze
required modules. You could even try a shallow freeze of the modules with
jythonc -j jythonLib.jar *.py, and put that jar in Classpath- but
that's kinda extreme (and I haven't tried it to know for sure if it
works :) Despite referring to jython's libs in this example, this applies
equally to packages and .py files of yours.
Best of luck.
-Robert
> George
>
>
> At 07:27 PM 2/13/2001 -0600, Robert W. Bill wrote:
> >Hi George,
> >
> >I tried it with lines commented out where something was missing (i.e.-
> >test2a), but it seemed to work fine.
> >
> >I have not seen the error, I am curious about your initialization in
> >the Java classs though. See test2run changes below...
> >
> >[George K. Thiruvathukal]
> > > I have a program that works when I run it standalone using jython:
> > >
> > > import os
> > > import os.path
> > > import sys
> > >
> > > from java.lang import System
> > >
> > > def go(out):
> > > title = "Example Apache JServ Servlet"
> > > out = System.out
> > >
> > > cwd = os.getcwd()
> > > addedDir = os.path.join(cwd, 'Python')
> > > out.println( 'current working directory = %s' % cwd)
> > > out.println( 'directory to add = %s' % addedDir)
> > > out.println( 'old path = %s' % sys.path)
> > > sys.path.append(addedDir)
> > > import Test2a
> > > out.println( 'new path = %s' % sys.path)
> > > out.println( 'now loading Test2a class and creating instance')
> > > out.println( 'object = %s' % Test2a.Test2a() )
> > > out.close()
> > >
> > > if __name__ == '__main__':
> > > out = System.out
> > > go(out)
> > >
> > > When I run it through the PythonInterpreter using this wrapper:
> > > import org.python.util.PythonInterpreter;
> > > import org.python.core.*;
> > >
> > > public class Test2Run {
> > > public static void main(String []args)
> > > throws PyException
> > > {
> > > PythonInterpreter interp =
> > > new PythonInterpreter();
> > >
> > > interp.exec("import Test2app");
> > > }
> > > }
> >
> >
> >You could try setting python.home and python.path...
> >
> >import org.python.util.PythonInterpreter;
> >import org.python.core.*;
> >import java.util.*;
> >
> >public class Test2Run {
> > public static void main(String[] args)
> > throws PyException
> > {
> > PythonInterpreter interp;
> > Properties props = new Properties();
> > props.setProperty("python.home","/usr/local/jython-2.0/");
> > props.setProperty("python.path", "/home/modules:scripts");
> > PythonInterpreter.initialize(System.getProperties(), props,
> > new String[0]);
> > interp = new PythonInterpreter();
> > interp.exec("import Test2app");
> > interp.exec('Test2app.go("whatever out should be") ');
> > }
> >}
> >
> >Just a guess. Good luck.
> >
> >-Robert
>
|
|
From: George K. T. <gk...@to...> - 2001-02-13 23:44:59
|
This proved to be very helpful. Apparently, the import of 'os' was where
things got tripped up, because the path was not correct.
I have now tried to repeat the same experiment by writing everything in
Python and using the jythonc/jython combination and running into the same
problem. What is the proper way to get classes to load in this scenario? I
tried doing the usually sys.path.append() without much luck.
George
At 07:27 PM 2/13/2001 -0600, Robert W. Bill wrote:
>Hi George,
>
>I tried it with lines commented out where something was missing (i.e.-
>test2a), but it seemed to work fine.
>
>I have not seen the error, I am curious about your initialization in
>the Java classs though. See test2run changes below...
>
>[George K. Thiruvathukal]
> > I have a program that works when I run it standalone using jython:
> >
> > import os
> > import os.path
> > import sys
> >
> > from java.lang import System
> >
> > def go(out):
> > title = "Example Apache JServ Servlet"
> > out = System.out
> >
> > cwd = os.getcwd()
> > addedDir = os.path.join(cwd, 'Python')
> > out.println( 'current working directory = %s' % cwd)
> > out.println( 'directory to add = %s' % addedDir)
> > out.println( 'old path = %s' % sys.path)
> > sys.path.append(addedDir)
> > import Test2a
> > out.println( 'new path = %s' % sys.path)
> > out.println( 'now loading Test2a class and creating instance')
> > out.println( 'object = %s' % Test2a.Test2a() )
> > out.close()
> >
> > if __name__ == '__main__':
> > out = System.out
> > go(out)
> >
> > When I run it through the PythonInterpreter using this wrapper:
> > import org.python.util.PythonInterpreter;
> > import org.python.core.*;
> >
> > public class Test2Run {
> > public static void main(String []args)
> > throws PyException
> > {
> > PythonInterpreter interp =
> > new PythonInterpreter();
> >
> > interp.exec("import Test2app");
> > }
> > }
>
>
>You could try setting python.home and python.path...
>
>import org.python.util.PythonInterpreter;
>import org.python.core.*;
>import java.util.*;
>
>public class Test2Run {
> public static void main(String[] args)
> throws PyException
> {
> PythonInterpreter interp;
> Properties props = new Properties();
> props.setProperty("python.home","/usr/local/jython-2.0/");
> props.setProperty("python.path", "/home/modules:scripts");
> PythonInterpreter.initialize(System.getProperties(), props,
> new String[0]);
> interp = new PythonInterpreter();
> interp.exec("import Test2app");
> interp.exec('Test2app.go("whatever out should be") ');
> }
>}
>
>Just a guess. Good luck.
>
>-Robert
|
|
From: Robert W. B. <rb...@di...> - 2001-02-13 21:47:41
|
[Robert]
> >On an unrelated note, module global variables are common in the Jython
> >world. Is there an advantage to PyServlet if each servlet has it's own
> >namespace to accomodate this?
[Finn]
> Well, is there an advantage? I considered it when I added PyServlet to
> the repository, but for smallish apps, the application namespace is an
> advantage IMHO. For larger apps, the application probably have to deal
> with more controlled namespaces anyway.
Very true about the namespaces. I'm not sure about
advantages, but currently module globals work- until another PyServlet
tramples them. This seemed in need of a fix. The choices looked like
disallowing globals, or adding individual namespaces, so I started
playing with "interp.exec('servlet in dict')". Anyway, it
also seemed to be some compensation for not having class static methods.
Not a very strong case either way, so I thought I'd ask before wasting
time "fixing" something not thought to be broke.
[Robert]
> >Also, is it possible to use the Py
> >methods directly so you can use things like:
> >
> > Py.exec(PyObject o, PyObject globals, PyObject locals)
> >
> >instead of interp.exec("code in ns")?
[Finn]
> Sure, it is possible. What do you expect the advantages to be? I can't
> image any good things about executing a toplevel .py module with
> different globals/locals namespaces.
Just curious about an easier way to make servlets use a unique global
namespace. Py.exec(servlet, localNS, globalNS); looked promising and
cleaner than passing a servlet and namespace into the interpreter, then
calling interp.exec("servlet.method in namespace").
This depends on whether adding the unique namespaces was thought to be a
good thing to begin with. If not, it doesn't matter. If so,
implementing them looked like one of three options:
1. an interpreter instance per PyServlet- overkill?
2. extract and insert servlet and namespace into and from the interpreter
for each request- messy?
3. execute the file, class, and servlet methods with Py.exec methods-
visually appealing, but not common practice, maybe for a
reason I thought :)
I'm sure there's a better way that I'm missing though.
It sounds like there's no want for unique namespaces though.
I'll leave this until told otherwise.
Thanks,
-Robert
|
|
From: Robert W. B. <rb...@di...> - 2001-02-13 20:30:04
|
Hi George,
I tried it with lines commented out where something was missing (i.e.-
test2a), but it seemed to work fine.
I have not seen the error, I am curious about your initialization in
the Java classs though. See test2run changes below...
[George K. Thiruvathukal]
> I have a program that works when I run it standalone using jython:
>
> import os
> import os.path
> import sys
>
> from java.lang import System
>
> def go(out):
> title = "Example Apache JServ Servlet"
> out = System.out
>
> cwd = os.getcwd()
> addedDir = os.path.join(cwd, 'Python')
> out.println( 'current working directory = %s' % cwd)
> out.println( 'directory to add = %s' % addedDir)
> out.println( 'old path = %s' % sys.path)
> sys.path.append(addedDir)
> import Test2a
> out.println( 'new path = %s' % sys.path)
> out.println( 'now loading Test2a class and creating instance')
> out.println( 'object = %s' % Test2a.Test2a() )
> out.close()
>
> if __name__ == '__main__':
> out = System.out
> go(out)
>
> When I run it through the PythonInterpreter using this wrapper:
> import org.python.util.PythonInterpreter;
> import org.python.core.*;
>
> public class Test2Run {
> public static void main(String []args)
> throws PyException
> {
> PythonInterpreter interp =
> new PythonInterpreter();
>
> interp.exec("import Test2app");
> }
> }
You could try setting python.home and python.path...
import org.python.util.PythonInterpreter;
import org.python.core.*;
import java.util.*;
public class Test2Run {
public static void main(String[] args)
throws PyException
{
PythonInterpreter interp;
Properties props = new Properties();
props.setProperty("python.home","/usr/local/jython-2.0/");
props.setProperty("python.path", "/home/modules:scripts");
PythonInterpreter.initialize(System.getProperties(), props,
new String[0]);
interp = new PythonInterpreter();
interp.exec("import Test2app");
interp.exec('Test2app.go("whatever out should be") ');
}
}
Just a guess. Good luck.
-Robert
|
|
From: <bc...@wo...> - 2001-02-13 20:01:56
|
On Tue, 13 Feb 2001 13:46:30 -0600 (CST), you wrote:
>Hi all,
>
>Just curious- is it reasonable to add a destroy() for the PyServlets.
Yes, I think so.
>Something like:
>
> public void destroy()
> {
> Enumeration e = cache.keys();
> while (e.hasMoreElements()) {
> CacheEntry ce = e.getNext();
> HttpServlet pyServlet = (HttpServlet)ce.servlet;
> pyServlet.destroy();
> }
> }
>
>Not this code, it's just the quickest example, but a destroy
>would be nice if a PyServlet wants to do something specific when
>unloaded.
>
>If this is something good, should reset() call destroy() on PyServlets as
>part of the reset, in case they do something important in destroy()?
Yes. We might as well try to make PyServlet play nice as a kind of
servlet container.
>On an unrelated note, module global variables are common in the Jython
>world. Is there an advantage to PyServlet if each servlet has it's own
>namespace to accomodate this?
Well, is there an advantage? I considered it when I added PyServlet to
the repository, but for smallish apps, the application namespace is an
advantage IMHO. For larger apps, the application probably have to deal
with more controlled namespaces anyway.
>It would mean a PyDict for each servlet, is that wasteful for just module
>globals?
No.
>Also, is it possible to use the Py
>methods directly so you can use things like:
>
> Py.exec(PyObject o, PyObject globals, PyObject locals)
>
>instead of interp.exec("code in ns")?
Sure, it is possible. What do you expect the advantages to be? I can't
image any good things about executing a toplevel .py module with
different globals/locals namespaces.
regards,
finn
|
|
From: George K. T. <gk...@to...> - 2001-02-13 17:59:12
|
I have a program that works when I run it standalone using jython:
import os
import os.path
import sys
from java.lang import System
def go(out):
title = "Example Apache JServ Servlet"
out = System.out
cwd = os.getcwd()
addedDir = os.path.join(cwd, 'Python')
out.println( 'current working directory = %s' % cwd)
out.println( 'directory to add = %s' % addedDir)
out.println( 'old path = %s' % sys.path)
sys.path.append(addedDir)
import Test2a
out.println( 'new path = %s' % sys.path)
out.println( 'now loading Test2a class and creating instance')
out.println( 'object = %s' % Test2a.Test2a() )
out.close()
if __name__ == '__main__':
out = System.out
go(out)
When I run it through the PythonInterpreter using this wrapper:
import org.python.util.PythonInterpreter;
import org.python.core.*;
public class Test2Run {
public static void main(String []args)
throws PyException
{
PythonInterpreter interp =
new PythonInterpreter();
interp.exec("import Test2app");
}
}
This happens:
Exception in thread "main" Traceback (innermost last):
File "<string>", line 1, in ?
File "/webhome/servlets/gkt/WEB-INF/classes/./Test2app.py", line 10, in ?
java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at org.python.modules.os.<clinit>(os.java:11)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at
org.python.core.SyspathJavaLoader.loadClass(SyspathJavaLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at org.python.core.Py.findClassEx(Py.java:607)
at org.python.core.imp.loadBuiltin(imp.java:198)
at org.python.core.imp.load(imp.java:354)
at org.python.core.imp.load(imp.java:376)
at org.python.core.imp.importName(imp.java:447)
at org.python.core.imp.importName(imp.java:509)
at org.python.core.ImportFunction.load(__builtin__.java:967)
at org.python.core.ImportFunction.__call__(__builtin__.java:961)
at org.python.core.PyObject.__call__(PyObject.java:250)
at org.python.core.__builtin__.__import__(__builtin__.java:921)
at org.python.core.imp.importOne(imp.java:518)
at
Test2app$py.f$0(/webhome/servlets/gkt/WEB-INF/classes/./Test2app.py)
at
Test2app$py.call_function(/webhome/servlets/gkt/WEB-INF/classes/./Test2app.py)
at org.python.core.PyTableCode.call(PyTableCode.java:155)
at org.python.core.imp.createFromCode(imp.java:157)
at org.python.core.imp.createFromPyClass(imp.java:74)
at org.python.core.imp.loadFromPath(imp.java:310)
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.importOne(imp.java:518)
at org.python.pycode._pyx0.f$0(<string>)
at org.python.pycode._pyx0.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:155)
at org.python.core.Py.runCode(Py.java:1055)
at org.python.core.Py.exec(Py.java:1076)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:135)
at Test2Run.main(Test2Run.java:11)
java.lang.ExceptionInInitializerError: java.lang.ExceptionInInitializerError
Anyone run into this before? There is some failure happening with a class
initializer (in Java).
George
|