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: Chris M. <ch...@bo...> - 2001-11-17 20:28:09
|
My program works fine in jython, but I can't use jythonc to create an
applet.
I narrowed the problem down to this line of python code:
import random
The stack trace given when I try to run the applet is as follows (it's
longer than that, but I'm trying to keep the message short).
Java Traceback:
at org.python.core.Py.JavaError(Py.java)
at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.__builtin__.eval(__builtin__.java)
at org.python.core.__builtin__.eval(__builtin__.java)
at java.lang.reflect.Method.invoke(Native Method)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyObject.__call__(PyObject.java)
at random$_PyInner._verify$1(random.java:377)
at random$_PyInner.call_function(random.java:310)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.java)
at random$_PyInner.main$31(random.java:1029)
at random$_PyInner.call_function(random.java:370)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
<snip>
So, it appears that the _verify method in the random module is doing an
eval! That's all well and good, but I don't have org.python.core.parser
anywhere in my jar file. Oops.
It turns out that adding that file doesn't help. If I use the --all
flag, I get this:
Java Traceback:
at org.python.core.Py.JavaError(Py.java)
at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.__builtin__.eval(__builtin__.java)
at org.python.core.__builtin__.eval(__builtin__.java)
at java.lang.reflect.Method.invoke(Native Method)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at
org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java)
at org.python.core.PyObject.__call__(PyObject.java)
at random$_PyInner._verify$1(random.java:377)
....
File "/usr/local/jython-2.1a3/Lib/random.py", line 0, in main
File "/usr/local/jython-2.1a3/Lib/random.py", line 0, in _verify
java.security.AccessControlException: access denied
(java.lang.RuntimePermission createClassLoader)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
at
java.security.AccessController.checkPermission(AccessController.java:399)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at
java.lang.SecurityManager.checkCreateClassLoader(SecurityManager.java:610)
at java.lang.ClassLoader.<init>(ClassLoader.java:234)
at org.python.core.BytecodeLoader1.<init>(BytecodeLoader1.java)
at org.python.core.BytecodeLoader.makeLoader(BytecodeLoader.java)
at org.python.core.BytecodeLoader.makeClass(BytecodeLoader.java)
at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.Py.compile_flags(Py.java)
at org.python.core.Py.compile_flags(Py.java)
etc, etc.
So, I tried not importing random at all, but rather doing a simple eval:
print eval("1 + 1")
Again, I am required to use --all (which kind of makes sense), and
again, I get an AccessControlException just like above.
Does this mean that I can't use eval or any module that uses eval in my
applets?
C
|
|
From: Chris M. <ch...@bo...> - 2001-11-17 19:44:09
|
First of all, I love Jython! I have done some amazing things with it in
the two days of experience that I have :)
I have an application working in Jython, and I am currently trying to
get the applet to work, as well. I am using Jython 2.1a3 with JDK
1.3.1_01 from Sun.
I did the following:
jythonc --core --deep --jar myapplet.jar myapplet.py
And it produced the appropriate jar file with all of the fixings, as
expected.
However, when trying to invoke the applet with appletviewer (or in a
browser plugin), I got the following:
java.lang.NoClassDefFoundError: org/python/compiler/JavaMaker
I finally isolated it to this line of python code:
from java.awt import Panel, Font, Button, Panel, Color, Label
Notice that 'Panel' is imported twice in that list. That was causing
the problem (but the error was not very helpful at all). Once I removed
the spurious Panel import, I stopped getting that particular error.
I am currently struggling with a different error, but the one above is
clearly (IMHO) a Jython bug, and I figured I should let you guys know.
;-)
C
|
|
From: <bc...@wo...> - 2001-11-16 21:00:36
|
[Kevin] >I'm not sure if it is just me, or if it is really hard to find a link > from www.jython.org to the javadocs (http://www.jython.org/docs/api/). >The only link I've found is to go to Documentation, then Embedding Jython, >follow the link to org.python.util.PythonInterpreter, then go to 'Frames' >(or munge the URLs...) > >Could we put a link to the javadocs on the "Documentation" page? Done. regards, finn |
|
From: Kevin B. <kb...@ca...> - 2001-11-16 00:08:58
|
I'm not sure if it is just me, or if it is really hard to find a link from www.jython.org to the javadocs (http://www.jython.org/docs/api/). The only link I've found is to go to Documentation, then Embedding Jython, follow the link to org.python.util.PythonInterpreter, then go to 'Frames' (or munge the URLs...) Could we put a link to the javadocs on the "Documentation" page? kb |
|
From: Kevin B. <kev...@bi...> - 2001-11-15 17:47:55
|
Finn Bock wrote: > [Kevin] > > [In cygwin I had actually enter ctrl-M ctrl-J at the command prompt to > include a CRLF in the output of "cmd.exe /c set"] What I've been doing is typing: export X='asdf zxcv' > So it seems like "cmd.exe /c set" is loosing the significant embedded > newline. Is this also the case for "sh -c env" on unixes? I suspect it > is. Yes - both "cmd.exe /c set" and "sh -c env" output the same, broken way. :-( > It appears that the bash builtin "set" command writes its output in a > way that can be used for input. So while commands we execute now must > remain the portable default, we could have a mode that uses "bash -c > set" and convert the output back into real values: > > X=$'My\nPATH=Kevin' > > It seems it would have to deal with the $'..' and backslash quoting. On my cygwin system (bash 2.02.1(2)), bash -c set outputs: X='asdf zxcv' (no the $ or backslash escapes), but my Linux system (bash 2.05.0(1)) outputs as you described. Easy enough to add a 'gnu' os type that does 'bash -c set', but the quoting requires a rewrite of _getEnvironment (or a subclass of _ShellEnv) - probably read the whole file, us re.split/findall to parse it out, and ??? to unescape the escaped chars, and maybe something to handle the $/no$/escaped-chars. Yuck. >It is not a requirement to fix this far-fetched problem before beta1. Yes - I don't think the niche of 'gnu users using multi-line environment variables that have equal signs in lines after the first' is big enough to worry about it at this point... (Anyone who disagrees is welcome to implement it... :-) ) kb |
|
From: <bc...@wo...> - 2001-11-15 09:03:32
|
[Kevin] >How about this? >... Committed. >If a subsequent line has an equals sign, this code will treat it as a new >variable assignment. We could get complex and define what characters are >valid in shell variable names, but there would still be cases where it >wouldn't work (e.g., X='My\nname=Kevin') > >I think allowing some multi-line variables is useful, and handling the other >multi-liners w/o raising errors is helpful. Indeed. Still, we end up with a corrupt environment and when passed to os.system() it may cause other errors. Such as when PATH is reset: X='My\nPATH=Kevin' [In cygwin I had actually enter ctrl-M ctrl-J at the command prompt to include a CRLF in the output of "cmd.exe /c set"] So it seems like "cmd.exe /c set" is loosing the significant embedded newline. Is this also the case for "sh -c env" on unixes? I suspect it is. It appears that the bash builtin "set" command writes its output in a way that can be used for input. So while commands we execute now must remain the portable default, we could have a mode that uses "bash -c set" and convert the output back into real values: X=$'My\nPATH=Kevin' It seems it would have to deal with the $'..' and backslash quoting. It is not a requirement to fix this far-fetched problem before beta1. regards, finn |
|
From: Kevin B. <kev...@bi...> - 2001-11-15 05:33:19
|
brian zimmer wrote:
> Well I'm a pessimist and I have the first bug in javaos.py.
:-) No, no - my 'stderr shows up at the end of stdout' is first. ;-)
> I'm on a Win2K box running Cygwin bash and when I execute `env` I get
> the following (abbreviated for readability):
> WINDIR=C:\WINNT
> USERPROFILE=C:\Documents and Settings\brian zimmer
> PS1=\[\033]0;\w\007
> \033[32m\]\u@\h \[\033[33m\w\033[0m\]
> $
> ANT_HOME=//d/java/third/apache/jakarta-ant-1.3
> PROGRAMFILES=C:\Program Files
> USER=bzimmer
>
> You'll notice the PS1 variable wraps to a new line and causes a
> ValueError to be thrown:
Ah, yes. I remember wondering about that case. Unfortunately, I don't know
that there's much we can do about it, except catch the ValueError and append
the value to the previous variable...
How about this?
def _getEnvironment( self ):
"""Get the environment variables by spawning a subshell.
This allows multi-line variables as long as subsequent lines do
not have '=' signs.
"""
p = self.execute( self.getEnv )
env = {}
key = 'firstLine' # in case first line had no '='
for line in self._readLines( p.getInputStream() ):
try:
i = line.index( '=' )
key = self._keyTransform(line[:i])
value = line[i+1:]
except ValueError:
# found no '=', so this line is part of previous value
value = '%s\n%s' % ( value, line )
env[ key ] = value
return env
If a subsequent line has an equals sign, this code will treat it as a new
variable assignment. We could get complex and define what characters are
valid in shell variable names, but there would still be cases where it
wouldn't work (e.g., X='My\nname=Kevin')
I think allowing some multi-line variables is useful, and handling the other
multi-liners w/o raising errors is helpful.
Thoughts?
kb
|
|
From: brian z. <bz...@zi...> - 2001-11-15 02:22:29
|
Well I'm a pessimist and I have the first bug in javaos.py. I'm on a Win2K box running Cygwin bash and when I execute `env` I get the following (abbreviated for readability): WINDIR=C:\WINNT USERPROFILE=C:\Documents and Settings\brian zimmer PS1=\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ANT_HOME=//d/java/third/apache/jakarta-ant-1.3 PROGRAMFILES=C:\Program Files USER=bzimmer You'll notice the PS1 variable wraps to a new line and causes a ValueError to be thrown: Jython 2.1b1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import os >>> os.environ Traceback (innermost last): File "<console>", line 1, in ? File "d:\home\development\sourceforge\jython\Lib\javaos.py", line 127, in __repr__ File "d:\home\development\sourceforge\jython\Lib\javaos.py", line 122, in _LazyDict__populate File "d:\home\development\sourceforge\jython\Lib\javaos.py", line 273, in _getEnvironment ValueError: substring not found in string.index >>> For the moment I've just wrapped it in a try/except block but then the value of the PS1 variable is truncated in the .environ dictionary. thanks, brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...] On Behalf Of Finn Bock > Sent: Wednesday, November 14, 2001 12:49 PM > To: jyt...@li... > Subject: Re: [Jython-dev] updated javaos.py > > > [Kevin] > > >But I just realized I should have started the stderr-reading thread > >before reading stdout, so that we don't see all of stdout > before seeing > >any of stderr. > > > >Sorry about that! Hopefully no more changes to this for a long time. > > Ohh, you are such an optimist. > > Don't worry about changes; development is what we do here. I > feel the fundamentals is fine, the details can be straighten > out over time and with user feedback. If you are volunteering > to deal with the feedback and questions, I will gladly commit > the patches. > > >Here's the patch: > > Has been committed. > > regards, > finn > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/j> ython-dev > |
|
From: <bc...@wo...> - 2001-11-14 19:36:31
|
[Clark Updike] >Does anyone know a way to make applications that expect a working Python >installation instead work with a Jython installation (on windows)? > >I put a python.bat file that directs to Jython so that the following works >fine: > >C:\>python HelloWorld.py > >I suspect that there are Windows registry settings involved, and that >regsetup.py (part of the Python windows install) might possibly be hacked to >fake out applications, but I'm not sure how to do it. Incidentally, I'm >trying to run WinCVS which expects Python. Yes, worst case I could install >Python. But that doesn't make sense if you have to do it for every Jython >and WinCVS user you have to administer. I can't imagine that it is possible. I'm not familiar with WinCVS but I expect its python support comes by linking its C++ sources with a pythonXX.dll file. If that is the case, you will need the pythonXX.dll and there is currently no way to fake that with jython. regards, finn |
|
From: Updike, C. <Cla...@jh...> - 2001-11-14 18:46:34
|
Does anyone know a way to make applications that expect a working Python installation instead work with a Jython installation (on windows)? I put a python.bat file that directs to Jython so that the following works fine: C:\>python HelloWorld.py I suspect that there are Windows registry settings involved, and that regsetup.py (part of the Python windows install) might possibly be hacked to fake out applications, but I'm not sure how to do it. Incidentally, I'm trying to run WinCVS which expects Python. Yes, worst case I could install Python. But that doesn't make sense if you have to do it for every Jython and WinCVS user you have to administer. TIA, Clark |
|
From: <bc...@wo...> - 2001-11-14 18:45:59
|
[Kevin] >But I just realized I should have started the stderr-reading thread >before reading stdout, so that we don't see all of stdout before seeing >any of stderr. > >Sorry about that! Hopefully no more changes to this for a long time. Ohh, you are such an optimist. Don't worry about changes; development is what we do here. I feel the fundamentals is fine, the details can be straighten out over time and with user feedback. If you are volunteering to deal with the feedback and questions, I will gladly commit the patches. >Here's the patch: Has been committed. regards, finn |
|
From: Kevin B. <kb...@ca...> - 2001-11-14 17:23:15
|
Finn Bock wrote:
>
> [Kevin]
>
> >One update per week, pretty slow. :-(
>
> Don't worry about that. We have got by without it for almost 4 years
> despite frequent request for both compatible environment and system().
> It is so good to finally have both. Thanks.
My pleasure. :-)
But I just realized I should have started the stderr-reading thread
before reading stdout, so that we don't see all of stdout before seeing
any of stderr.
Sorry about that! Hopefully no more changes to this for a long time.
Here's the patch:
cvs diff -c javaos.py
Index: javaos.py
===================================================================
RCS file: /cvsroot/jython/jython/Lib/javaos.py,v
retrieving revision 2.9
diff -c -r2.9 javaos.py
*** javaos.py 2001/11/14 16:25:20 2.9
--- javaos.py 2001/11/14 17:12:35
***************
*** 219,229 ****
# _readLines( ... println )
def println( arg, write=sys.stdout.write ):
write( arg + "\n" )
- # read stdin in main thread
- self._readLines( p.getInputStream(), println )
# read stderr in secondary thread
thread.start_new_thread( self._readLines,
( p.getErrorStream(), println ))
return p.waitFor()
--- 219,229 ----
# _readLines( ... println )
def println( arg, write=sys.stdout.write ):
write( arg + "\n" )
# read stderr in secondary thread
thread.start_new_thread( self._readLines,
( p.getErrorStream(), println ))
+ # read stdin in main thread
+ self._readLines( p.getInputStream(), println )
return p.waitFor()
kb
|
|
From: <bc...@wo...> - 2001-11-14 16:30:19
|
[Kevin] >One update per week, pretty slow. :-( Don't worry about that. We have got by without it for almost 4 years despite frequent request for both compatible environment and system(). It is so good to finally have both. Thanks. >OK, I've incorporated environ.py into javaos.py (CVS 2.8). >Feedback welcome I did some minor reformatting of long lines to keep them below 79 characters and committed it in CVS. regards, finn |
|
From: Kevin B. <kev...@bi...> - 2001-11-14 06:44:25
|
One update per week, pretty slow. :-( OK, I've incorporated environ.py into javaos.py (CVS 2.8). I've attached the modified file and a registry w/ a descriptive comment Since the last post, I made the following changes: - enable based on registry settings - remove chdir (made os.chdir throw OSError) - added subthread to read stderror (one line of code - gosh I love Python *grin*) - get os.name from System properties instead of registry I also changed the javapath import to be "import javapath as path" because jython supports that form now... Feedback welcome kb |
|
From: <bc...@wo...> - 2001-11-10 20:43:24
|
>Before saying anything more, I would like to know what is happening in this >case: Take a look at bugtests/test338 which I hope illustrate the issue. >- which classloader is loading the classes from jython.jar The sun.misc.Launcher$AppClassLoader. >- which classloader is loading the classes using PythonInterpreter The custom classloader (Multi). >- why import loads the right class but BytecodeLoader not ??? Ahh yes. The superclass is not imported by python but loaded by the Multi loader and inserted manually into the interpreter namespace. If the superclass is imported imto the script, the example will still fail, but that is a feature <wink>. >- the content of sys.path and CLASSPATH In the test338 example the guilty superclass can be found by the CLASSPATH, in the sys.path and by the custom classloader. There is amble opportunity to load the guilty superclass by the wrong classloader here. regards, finn |
|
From: Samuele P. <ped...@bl...> - 2001-11-10 20:21:02
|
> > >> That is because the BytecodeLoaders happens to search the > >> SyspathJavaLoader before searching the referent class loaders. It's a > >> bug. > > > >No, I would'nt say it is a bug. The problem is that > >the guilty class is loadable > >both by MultiClassLoader and probably from classpath. > >In those cases it is better if the user dis-entangle that, because > >, yes we can with good-will, change the order, but the only safe > >solution is to avoid that at all. > > Right. > > >Without knowing the specific up to the details, I will not > >change the actual order. > > Ok, maybe simply reversing the order is too naive, but I can't imagine a > situation where it make sense to try and load a superclass by the > SyspathJavaLoader when we in BytecodeLoader.makeClass() know that the > superclass was initially loaded from one of the referent loaders. Before saying anything more, I would like to know what is happening in this case: - which classloader is loading the classes from jython.jar - which classloader is loading the classes using PythonInterpreter - why import loads the right class but BytecodeLoader not ??? - the content of sys.path and CLASSPATH Samuele. |
|
From: <bc...@wo...> - 2001-11-10 17:51:20
|
>> That is because the BytecodeLoaders happens to search the >> SyspathJavaLoader before searching the referent class loaders. It's a >> bug. > >No, I would'nt say it is a bug. The problem is that >the guilty class is loadable >both by MultiClassLoader and probably from classpath. >In those cases it is better if the user dis-entangle that, because >, yes we can with good-will, change the order, but the only safe >solution is to avoid that at all. Right. >Without knowing the specific up to the details, I will not >change the actual order. Ok, maybe simply reversing the order is too naive, but I can't imagine a situation where it make sense to try and load a superclass by the SyspathJavaLoader when we in BytecodeLoader.makeClass() know that the superclass was initially loaded from one of the referent loaders. regards, finn |
|
From: Sebastien D. <sde...@ve...> - 2001-11-09 19:49:39
|
Hi,
I have a very dummy Jython script, except.py, that does :
except.py :
1: import java.lang.Exception
2: raise java.lang.Exception
I then compile this to a standalone jar (jythonc --core --jar except.jar
except.py), that I call from another Java class; the call itself looks like
:
try {
String jar = "./except.jar";
URLClassLoader theLoader = new URLClassLoader(new URL[] { new URL("file:"
+ jar)});
Object theLoadedClass = Class.forName("except", true,
theLoader).newInstance();
String[] array = new String[] {};
Method main = theLoadedClass.getClass().
getMethod("main", new Class[] { array.getClass() });
main.invoke(theLoadedClass, new Object[] {new String[] {}});
}
catch (Throwable t) {
t.printStackTrace();
}
The problem is that my "catch" actually doesn't catch the Exception I'm
throwing/raising from the jython script.
On the other hand, I believe my Java call to execute the jar is legal, since
if I do :
except.java :
1: import java.lang.Exception;
2: public class except {
3: public static void main(String[] args) throws Exception {
4: throw new Exception();
5: }
6: }
and compile/jar that class into except.jar, then the exception is caught.
Thanks for any input, since I seem to be missing something obvious : I just
would like to be able to catch the exceptions raised from the python script,
in the java caller. I'm sure that's doable :)
--Sebastien
============================================================================
This message is intended only for the use of the Addressee(s) and may
contain information that is PRIVILEGED and CONFIDENTIAL. If you are not
the intended recipient, dissemination of this communication is prohibited.
If you have received this communication in error, please erase all copies
of the message and its attachments and notify pos...@ve...
immediately.
============================================================================
|
|
From: <bc...@wo...> - 2001-11-09 15:24:37
|
[dman] >In both Jython and CPython (2.1), > os.makedirs( "~/tmp/not/./new" ) >fails, however > os.makedirs( "~/tmp/not//new" ) >succeeds. > >The GNU 'mkdir' program works with either path (if --parents argument >is given, or all but last directory exist). > >Should os.makedirs() call os.normalize() first, or is this supposed to >be a client responsibility? I think it is the responsibility of the program, but I don't have a strong opinion about it. Strangly enough, both your examples works fine for me. Both example nicely creates a new directory below my $CWD called "~/tmp/not/new" (on win2k and jdk14b3). Right now our os.makedirs() function consist on a simple call to. File(path).mkdirs() It just feels really good to push the whole file system semantic nighmare over on java and forgot about it. regards, finn |
|
From: Kevin B. <kb...@ca...> - 2001-11-08 18:13:01
|
The easiest and most functional way is to type: jython FILENAME.py If you are running on a unix-like system, the first line of the file should be: #! /FULL_PATH/jython (this is the 'pound-bang hack') You also need to do: chmod a+x FILENAME.py ./FILENAME.py If you are running on a windows system, you can associate jython.bat with the file type '.py', but I don't generally use that functionality. kb APARNA SHIVAKUMAR wrote: > > Hi, > How do I make dot py file execute on the prompt. > I learning jython since 2 days, I have been able to run the applet when i > type the whole program on the prompt but unable to run the.py file... > Please help...! > Regards, > Aparna > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev |
|
From: dman <ds...@ri...> - 2001-11-08 16:37:12
|
On Thu, Nov 08, 2001 at 11:02:57AM +0000, APARNA SHIVAKUMAR wrote: | Hi, | How do I make dot py file execute on the prompt. | I learning jython since 2 days, I have been able to run the applet when i | type the whole program on the prompt but unable to run the.py file... What OS are you using? If it is a *nix, $ chmod u+x foo.py $ ./foo.py Also, be sure that the first line of the file is #!/full/path/to/jython HTH, -D |
|
From: Vanessa L. <re...@se...> - 2001-11-08 14:02:52
|
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
.stbtm {
BACKGROUND-COLOR:#cecbde; BORDER-BOTTOM: #665b8e 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #665b8e 1px solid; BORDER-TOP: #ffffff 1px solid; COLOR: #000000; FONT-SIZE: 12pt; HEIGHT: 26px; WIDTH: 120px; clip: rect( )}
.stedit {
background-color:#484C68; white-space: nowrap; border: #000000; BORDER-BOTTOM: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #ffffff 1px solid; FONT-SIZE: 10pt; color: #CCCCCC; font-weight: bold}
</style>
</head>
<BODY leftMargin=0 onload="" topMargin=0 marginheight="0" marginwidth="0" bgcolor="#FFFFFF">
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="233" width="21"> </td>
<td height="233" colspan="3" width="757">
<table width="621" border="0" cellspacing="0" cellpadding="0" align="left">
<tr>
<td width="373" height="64">
<table width="373" border="0" cellspacing="0" cellpadding="0" background="http://image.seekercenter.net/letter_bg.jpg" height="327">
<tr>
<td><p>
<font face=Arial size=2>
</font> <font face=Arial size=2><font face="Verdana, Arial, Helvetica, sans-serif" color="#000000">Hello,<br>
<br>
I have visited <a href='http://www.jython.org'>www.jython.org</a> and noticed that your website is not listed on some search engines.
I am sure that through our service the number of people who visit your website will definitely increase. <a target=_blank href="http://www.seekercenter.net/index.php">SeekerCenter</a>
is a unique technology that instantly submits your website
to over 500,000 search engines and directories
-- a really low-cost and effective way to advertise your site.
For more details please go to <a target=_blank href="http://www.seekercenter.net/index.php">SeekerCenter.net</a>.<br>
<br>
Give your website maximum exposure today!<BR>
Looking forward to hearing from you.<br>
<BR>
<table border=0 width=100%><TR><TD width=50%>
<font face="Verdana, Arial, Helvetica, sans-serif" size=2 color="#000000">Best
Regards,<br>
Vanessa Lintner<br>
Sales & Marketing <br>
<a target=_blank href="http://www.seekercenter.net/index.php">www.SeekerCenter.net</a></font></font></font>
<TD><td width=50%>
<div align="center" valign=middle>
<form target=_blank action=http://www.seekercenter.net method=POST>
<input type="submit" name="Submit" value="Signup Now!!!" class="stbtm">
</form>
</div>
</TD>
</TR>
</table>
</td>
</tr>
</table>
</td>
<td width="242" height="64" valign="bottom">
<table width="257" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="2"></td>
</tr>
<tr>
<td colspan="3" height="3">
<p><img src="http://image.seekercenter.net/letter_top01.jpg" width="326" height="15"></p>
</td>
</tr>
<tr>
<td colspan="3"><img src="http://image.seekercenter.net/letter_right01.jpg" width="31" height="185"><A target=_blank Href ="http://www.jython.org"><IMG Src =http://image.seekercenter.net/image162/1/7/img90.jpg Border=0 width="256" height="184"></A><img src="http://image.seekercenter.net/letter_left01.jpg" width="14" height="185"></td>
</tr>
<tr>
<td colspan="3" height="80" background="http://image.seekercenter.net/letter_bottom01.jpg">
<table width="326" border="0" cellspacing="0" cellpadding="0" height="80">
<tr>
<td width="36" height="43"> </td>
<td width="157" height="43"> </td>
<td width="134" height="43"> </td>
</tr>
<tr>
<td width="36" height="2"> </td>
<td width="157" height="2"> </td>
<td width="134" height="2"> </td>
</tr>
</table>
</td>
</tr>
<tr> </tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
|
|
From: APARNA S. <app...@ho...> - 2001-11-08 11:03:06
|
Hi, How do I make dot py file execute on the prompt. I learning jython since 2 days, I have been able to run the applet when i type the whole program on the prompt but unable to run the.py file... Please help...! Regards, Aparna _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
|
From: dman <ds...@ri...> - 2001-11-07 04:23:44
|
On Tue, Nov 06, 2001 at 09:00:24PM -0500, dman wrote:
| On Tue, Nov 06, 2001 at 06:45:18PM -0500, dman wrote:
| Oops, it's called "os.normpath()"
| and it is presently missing in javaos.py.
Sorry,
... it's supposed to be -- it is in os.path, not os.
Still the question of whether or not the makedirs function should
normalize remains.
-D
|
|
From: dman <ds...@ri...> - 2001-11-07 02:00:36
|
On Tue, Nov 06, 2001 at 06:45:18PM -0500, dman wrote: | | In both Jython and CPython (2.1), | os.makedirs( "~/tmp/not/./new" ) | fails, however | os.makedirs( "~/tmp/not//new" ) | succeeds. | | The GNU 'mkdir' program works with either path (if --parents argument | is given, or all but last directory exist). | | Should os.makedirs() call os.normalize() first, or is this supposed to | be a client responsibility? Oops, it's called "os.normpath()" and it is presently missing in javaos.py. I'll send a patch to create os.normpath. -D |