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: Adrian S. J. <as...@pa...> - 2001-06-26 10:59:24
|
Hi, Does anyone know how difficult it is to get multiple embedded Jython interpreters running in the same Java process in separate threads? I'm writing a multi-user game engine using Jython as the interactive programming environment. Each interpreter instance has its stdout/stderr redirected to a network connection. The problems I seem to have are: stdout/stderr for all instances get redirected to the last one set. If I try to 'set' a variable in one interpreter from another, the variable gets lost. Thanks in advance, Adrian St. John |
From: William D. <wdd...@ma...> - 2001-06-24 07:34:32
|
Hi, I'm having a strange problem that I hope someone here can give me quick hint to fix. I'm using Jython 2.1a1 on Mac OS 9.1, Win2000 and Mac OS X. On the first 2 (I haven't tried this on X), I am having the following problem: I have all of my menu commands launching new threads (via the threading module). I'm having no problems from this except when I use a ProgressMonitor when saving a file. The file writes just fine, but the call to monitor.close() never returns. If I don't launch the extra thread, the problem doesn't happen (however, the ProgressMonitor's contents are never drawn in this case). If I skip using the ProgressMonitor, all is OK. I see exactly the same thing in both Windoze 2000 and MacOS 9.1. Has anyone seen this, or have an idea of something to try? Thanks, Bill |
From: Stuart S. <st...@me...> - 2001-06-23 17:34:02
|
"Robert W. Bill" wrote: > > > - What's the memory footprint for the system ? > Left for others... The difference on my Win2K system between running and not running jython, with Sun JVM 1.3.0 was 8888 Kbytes (give or take a few Kb). YMMV... Stuart |
From: Robert W. B. <rb...@di...> - 2001-06-22 21:31:27
|
<moved to jython-users> Hello Nabil, It may be worth your while to rummage through the goodies at http://www.jython.org/docs. The wording of your questions might imply a misunderstanding about Jython (or on my part), so it would be good to get a feel from the current docs. The summary is Jython allows you to import and use Java classes from the classpath (and sys.path) within the python language syntax. It also allows Jython classes that meet certain restrictions to be compiled and work in Java as if they were native Java classes. It is a comprehensive integration of Java a Python into a programming language and is likely better understood if approached in this context. Specific replies appear below... On Fri, 22 Jun 2001, Nabil Obeid wrote: > I want to use a java python translator Using "translator" might be a bit odd. Jython is a full and legitimate implementation of a language defined in the Python language definition. It could be just me, but "translater" implies something different. > but before I would like > get informed about few issues. I would be grateful to have answer > for these questions ASAP. > > - Does jyhton provide a source only bridge or can it > use .jar and .class hierarchies ? Jython can load java classes from jars or directories. > - What is the runtime overhead associated passing > between Java and Python ? Is some overhead present > even when data is not passed between both of them ? Jython's performance is on par with other high-level, object-oriented languages. "Passing" specifically seems odd to single out because of the level of integration between Java and Python. memory overhead for Java objects wrapped in Jython is ~8-16 additional bytes depending on object and jvm (Finn Bock has sent better info concerning this to the jython-users mailing list- try searching the archives on "large data set finn bock"). > - Can we have native methods written in Python for > Java classes ? You can write a Jython class, compile it and use it from Java (if it meets requirements described at http://www.jython.org/docs/jythonc.html look for info on @sig strings and Java superclasses). You can also use an embedded Jython interpreter so that Java methods may employ the interpreter object. > - How is Java called from Python ? >>> import java # it's now accessible > - What's the memory footprint for the system ? Left for others... > - Can python debugger access Java instances and > classes? No > - Are there any limits restricting the use of > jython ? How about platforms ? Jython works where there is a fully compatible jvm >= 1.1. > - What are the limits imposed by the semantic > differences of Java and Python ? A team of thousands of experts across the globe were joined together and commissioned to discover any such limitations to Jython, but nobody has yet to hear from them :) Seriously now... The information you want is likely in the details of using Jython and would be too difficult to wrap in a generalized answer. For the broad topic "will Jython limit my application or ability to develop an application?" the answer is no more than Java would. Common generalizations about the Python language are that you trade some run-time speed for development speed, you trade compile-time type/protocol checking for flexibility, and you trade semi-colons and braces for indention. There really is more to it though, it's just an accumulation of subtle things that are hard to abbreviate in an email. Best of luck, Robert |
From: Kevin B. <kb...@ca...> - 2001-06-22 20:55:31
|
Is the class & method you're trying to call public? Also, you can edit the "respectJavaAccessibility" property in the jython "registry" file to allow access to protected/private classes & methods. kb "W. Jarrett Campbell" wrote: > Thanks to all for the tips on how to pass an array of strings to get > my jython experiment working. But now I get an > IllegalAccessException. Any clues?I needed to pass an array of > strings to the ArrayBenchmark class. But now I get this exception:>>> > com.ydyn.dynamo.test.ArrayBenchmark.main(['10', '100']) > Traceback (innermost last): > File "<console>", line 1, in ? > java.lang.IllegalAccessException > at java.lang.reflect.Method.invoke(Native Method) > at > org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java > :158) > at > org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java > :166) > at org.python.core.PyObject.__call__(PyObject.java:272) > at org.python.core.PyObject.invoke(PyObject.java:2105) > at org.python.pycode._pyx2.f$0(<console>) > at org.python.pycode._pyx2.call_function(<console>) > 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:145) > at > org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter > .java:87) > at > org.python.util.InteractiveInterpreter.runsource(InteractiveInterpret > er.java:68) > at > org.python.util.InteractiveInterpreter.runsource(InteractiveInterpret > er.java:42) > at > org.python.util.InteractiveConsole.push(InteractiveConsole.java:83) > at > org.python.util.InteractiveConsole.interact(InteractiveConsole.java:6 > 2) > at > org.python.util.jython.main(jython.java:178) java.lang.IllegalAccessException: > java.lang.IllegalAccessException > >>> > > [Image] W. Jarrett Campbell, Ph.D. 512.323.9149 Member of the office Technical Staff 512.257.9503 fax Yield Dynamics, 512.415.1078 Inc. mobile 5838 Balcones ja...@yd... Drive, Ste. 101 http://www.ydyn.com Austin, TX 78731 > |
From: Robert W. B. <rb...@di...> - 2001-06-22 20:08:55
|
Hello Jarrett, "10 100" doesn't autoconvert to an array. More below... On Fri, 22 Jun 2001, W. Jarrett Campbell wrote: > Hello. I've been using Python for a short while and one of my developers is > insisting he'd prefer to supply me with Java classes rather than C++ classes > so I'm contemplating making the jump to Jython. > > We were running a simple benchmark test to see if we could this system > working for us and I've encountered a few problems. Could someone here give > me a few pointers? > > I'm trying to execute the following method in Jython: > > public static void main(String[] args) { > > try { > int count = Integer.parseInt(args[0]); > int arraySize = Integer.parseInt(args[1]); > > ArrayBenchmark test = new ArrayBenchmark(); > test.setLength( arraySize ); > > long totalTime = test.repeat(count); > System.out.println("Array Benchmark: " + count + " iteration(s) in " > + totalTime + " milliseconds"); > } catch (Exception e) { > System.out.println("Exception: " + e); > e.printStackTrace(); > } > } > > Every time I execute this command, I get a message that the String coercion > is failing. Any ideas? > > >>> com.ydyn.dynamo.test.ArrayBenchmark.main('10 100') > Traceback (innermost last): > File "<console>", line 1, in ? > TypeError: main(): 1st arg can't be coerced to String[] > >>> "10 100" becomes a String, not a String[]. Jython's nifty little tricks allow you to use a Python List (PyList class) type full 'o strings to auto convert to a String[]. i.e.: >>> com.ydyn.dynamo.test.ArrayBenchmark.main(['10000000', '100']) Array benchmark: 10000000 iterations in ... -robert |
From: Kevin B. <kb...@ca...> - 2001-06-22 19:58:04
|
Just looked a little more closely at your Java code, and I think what you probably wanted to write was: import time ## from wherever import ArrayBenchmark test = ArrayBenchmark() test.setLength( arraySize ) totalTime = test.repeat( count ) print "Array Benchmark: %(count)d iterations in %(totalTime)d milliseconds" % vars() No sense writing more Java than you have to. <.5 wink> kb "W. Jarrett Campbell" wrote: > Hello. I've been using Python for a short while and one of my > developers is insisting he'd prefer to supply me with Java classes > rather than C++ classes so I'm contemplating making the jump to > Jython.We were running a simple benchmark test to see if we could this > system working for us and I've encountered a few problems. Could > someone here give me a few pointers?I'm trying to execute the > following method in Jython: public static void main(String[] args) { > try { > int count = Integer.parseInt(args[0]); > int arraySize = Integer.parseInt(args[1]); > ArrayBenchmark test = new ArrayBenchmark(); > test.setLength( arraySize ); > > long totalTime = test.repeat(count); > System.out.println("Array Benchmark: " + count + " iteration(s) > in " + totalTime + " milliseconds"); > } catch (Exception e) { > System.out.println("Exception: " + e); > e.printStackTrace(); > } > } > Every time I execute this command, I get a message that the String > coercion is failing. Any ideas?>>> > com.ydyn.dynamo.test.ArrayBenchmark.main('10 100') > Traceback (innermost last): > File "<console>", line 1, in ? > TypeError: main(): 1st arg can't be coerced to String[] > >>> > > [Image] W. Jarrett Campbell, Ph.D. 512.323.9149 Member of the office Technical Staff 512.257.9503 fax Yield Dynamics, 512.415.1078 Inc. mobile 5838 Balcones ja...@yd... Drive, Ste. 101 http://www.ydyn.com Austin, TX 78731 > |
From: Kevin B. <kb...@ca...> - 2001-06-22 19:49:47
|
The problem is you're passing a String (containing a space-separated list of strings) into a method that expects a String array. try: ...main( string.split( "10 100" )) tuples or lists of strings should be coerced automatically to String arrays. For some complex cases involving arrays, you may need to investigate the jarray module, but most of the time the automatic coercion of sequences to arrays works fine. kb "W. Jarrett Campbell" wrote: > Hello. I've been using Python for a short while and one of my > developers is insisting he'd prefer to supply me with Java classes > rather than C++ classes so I'm contemplating making the jump to > Jython.We were running a simple benchmark test to see if we could this > system working for us and I've encountered a few problems. Could > someone here give me a few pointers?I'm trying to execute the > following method in Jython: public static void main(String[] args) { > try { > int count = Integer.parseInt(args[0]); > int arraySize = Integer.parseInt(args[1]); > ArrayBenchmark test = new ArrayBenchmark(); > test.setLength( arraySize ); > > long totalTime = test.repeat(count); > System.out.println("Array Benchmark: " + count + " iteration(s) > in " + totalTime + " milliseconds"); > } catch (Exception e) { > System.out.println("Exception: " + e); > e.printStackTrace(); > } > } > Every time I execute this command, I get a message that the String > coercion is failing. Any ideas?>>> > com.ydyn.dynamo.test.ArrayBenchmark.main('10 100') > Traceback (innermost last): > File "<console>", line 1, in ? > TypeError: main(): 1st arg can't be coerced to String[] > >>> > > [Image] W. Jarrett Campbell, Ph.D. 512.323.9149 Member of the office Technical Staff 512.257.9503 fax Yield Dynamics, 512.415.1078 Inc. mobile 5838 Balcones ja...@yd... Drive, Ste. 101 http://www.ydyn.com Austin, TX 78731 > |
From: Steinar R. E. <ste...@fi...> - 2001-06-20 11:27:42
|
RE: [Jython-users] Running Jython within WebLogicI have been using = Jython as an integrated language in JBoss. I use Java on top, making up = the EJB facade interfaces, and then I sub class with embedded Jython the = inner classes.=20 Jython uses JBoss for getting DB conenction pool etc, and it seems a = great way of prototyping enterpsie Java systems. Steinar ----- Original Message -----=20 From: Don Coleman=20 To: 'Dean Thompson' ; jyt...@li...=20 Sent: Tuesday, June 19, 2001 6:35 PM Subject: RE: [Jython-users] Running Jython within WebLogic We use jython with Weblogic 5.1 for interactively testing EJBs. It = works great.=20 >-----Original Message-----=20 >From: Dean Thompson [mailto:dth...@me...]=20 >Sent: Tuesday, June 19, 2001 11:23 AM=20 >To: jyt...@li...=20 >Subject: [Jython-users] Running Jython within WebLogic=20 >=20 >=20 >=20 >Does anyone have experience running Jython in a WebLogic environment? = I think the most likely=20 >scenario for us would be to invoke Jython scripts from within = servlets, and then invoke further=20 > Java APIs from within those Jython scripts.=20 >=20 >Dean=20 |
From: Danny A. <dan...@bt...> - 2001-06-20 10:20:35
|
I've not entirely got my head around how Jython operates - does it do all the interpretation (building the Java structures) first, before actually doing any of the job? This could case big delays in the initialization of an applet. --- Danny Ayers http://www.isacat.net >-----Original Message----- >From: jyt...@li... >[mailto:jyt...@li...]On Behalf Of Dave Crane >Sent: 20 June 2001 09:49 >To: jyt...@li... >Subject: [Jython-users] Re: Jython Applets > > >Hi Ron, > >Off the top of my head, Jython uses a lot of reflection. >Reflection API methods are native, so perhaps the performance lag >is due to the netscape implementation of reflection not being as >hot as those in IE? > >Just a hypothesis, but presumably writing a little benchmark >applet that reflects a lot without using Jython could tell you if >this is the case? > >If it is, I guess its bad news, because there ain't much you can >do to fix it, but it might be worth knowing? > >Regards, > >Dave > >> The problem is the load time. IE does it in 2-3 seconds, which is >> acceptable. Netscape 4.75 takes about 35 seconds, which is not >> acceptable. Lest you jump on Netscape because of its old (1.15) >> browser, the equivalent Java applet takes only about 5 seconds to load >> in Netscape. Is Netscape is wasting all that time looking for >> java.util.HashMap? Is there a workaround? >> > >------------------------------------------------------ >-- Dave Crane ------------------ ul...@bi... -- >-- home tel 0117 968 3506 ---------------------------- >------------------------------------------------------ > >Find the best deals on the web at AltaVista Shopping! >http://www.shopping.altavista.com > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Dave C. <ul...@bi...> - 2001-06-20 08:49:06
|
Hi Ron, Off the top of my head, Jython uses a lot of reflection. Reflection API methods are native, so perhaps the performance lag is due to the netscape implementation of reflection not being as hot as those in IE? Just a hypothesis, but presumably writing a little benchmark applet that reflects a lot without using Jython could tell you if this is the case? If it is, I guess its bad news, because there ain't much you can do to fix it, but it might be worth knowing? Regards, Dave > The problem is the load time. IE does it in 2-3 seconds, which is > acceptable. Netscape 4.75 takes about 35 seconds, which is not > acceptable. Lest you jump on Netscape because of its old (1.15) > browser, the equivalent Java applet takes only about 5 seconds to load > in Netscape. Is Netscape is wasting all that time looking for > java.util.HashMap? Is there a workaround? > ------------------------------------------------------ -- Dave Crane ------------------ ul...@bi... -- -- home tel 0117 968 3506 ---------------------------- ------------------------------------------------------ Find the best deals on the web at AltaVista Shopping! http://www.shopping.altavista.com |
From: <bc...@wo...> - 2001-06-19 18:05:26
|
[Gerry] >HI, >I have successfully used CPython's imp.load_module() in the past to load >Python code on the fly. This has been invaluable for lots of reasons >including the ability to introduce modules dynamically into a running system. > The same code will not work with Jython because Jython lacks the >imp.load_module() method, and the comment for the module states that the >methods implemented there are those that, in the writer's words, "can" be >implemented under J(P)ython. Is this true? It's true. At least until someone proves me wrong and submits a working patch. >I would appreciate any help in doing what the CPython load_module() provides >under Jython. I'm sure that my lack of knowledge of Jython's import code is >the problem - there's probably a solution so easy that I'm not even seeing >it. The archives don't seem to have anything related. The import-sig >postings haven't helped yet. I have blissfully forgotten the finer details of imp.load_module() but you can fake an import with code like this. It creates a module, inserts it in sys.modules and execute some code in the module namespace. moduletext = """ import sys def foo(): print sys.path """ import sys, new sys.modules['mymodule'] = mod = new.module("mymodule") exec moduletext in mod.__dict__ regards, finn |
From: Carlos G. A. <ga...@to...> - 2001-06-19 17:51:56
|
Ok guys, where can I find documentation about that? I mean servlets in Jython. Chau, Gaston ----- Original Message ----- From: Andrew Boyko <ab...@fa...> To: <jyt...@li...> Sent: Tuesday, June 19, 2001 1:16 PM Subject: RE: [Jython-users] PyServlet (Was: Running Jython within WebLogic) > > Does anyone have experience running Jython in a WebLogic > > environment? I think the most likely scenario for us would > > be to invoke Jython scripts from within servlets, and then > > invoke further Java APIs from within those Jython scripts. > > A little bit of experimentation with org.python.util.PyServlet > has me pretty excited - it seems very easy to configure so > you can load your own python scripts (implementing HttpServlet) > directly from your webapp's HTML root directory. The scripts > can then load java classes from your webapp. I haven't tried > it in WebLogic, but the configuration is very simple and should > work in any Servlet 2.2-compliant container. In this model, > the Jython script *is* the servlet, but it's pretty close to > what you described... > > It seems like python servlets can even import other non-servlet > python classes from the HTML root, but it's a little awkward, > since they need to be imported by full package name, and > the directory with the scripts in it must have an __init__.py > in it for the import to work. Not worth complaining about, > but it was a little tough to figure out... is there an easier > way? Ideally, you'd be able to stick a few python files, > including the servlet script, in some random directory > under the web app; you'd invoke the jython servlet by its full > name, but have the servlet be able to directly import other > scripts in the same directory without needing to reference > the name of the directory they're in. > > Seems like jython scripts could easily coexist with JSPs, > placing objects in the request context and then forwarding > to a JSP to do the presentation. I imagine it could > integrate very nicely with Jakarta Struts, too - Python > seems like a good language to implement Action classes in. > > Andy Boyko ab...@fa... > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: ron g. <rg...@un...> - 2001-06-19 17:11:50
|
For reasons that I won't go into here, I need to be able to produce applets that run under the JVMs built into typically used browsers (e.g., IE 5.x and Netscape 4.7x). Thus, I set up Jython using Sun's JDK 1.1.8 and built class files from a simple Jython module which extends one of my Java classes (which itself is an extension of Applet). Despite an error (can't find a class java.util.HashMap -- not surprising since that is a Java 2 class, but surprising since the reference apparently comes from Jython), the applet loads and executes properly in both IE and Netscape. The problem is the load time. IE does it in 2-3 seconds, which is acceptable. Netscape 4.75 takes about 35 seconds, which is not acceptable. Lest you jump on Netscape because of its old (1.15) browser, the equivalent Java applet takes only about 5 seconds to load in Netscape. Is Netscape is wasting all that time looking for java.util.HashMap? Is there a workaround? For anyone interested, the Jython source is given below: from pawt import awt, colors import java from com.rlgreene.illum import NoRecIllum,DrawArea,Ball,Trajectory class JyInstVel(NoRecIllum): def start(self): global da,showVel,showAcc,timeDelay,nPts,nSkip,x0,v0x,ax showVel = showAcc = 0 timeDelay = 40 nPts = 100 nSkip = 1 x0 = 0.0 v0x = 1.0 ax = 0.0 da = DrawArea(10,300,0.0,10.0,40,0.0,1.0) da.visible = 1 self.add(da) def doGo(self): b = Ball(x0,0.5,v0x,0.0,ax,0.0) traj = Trajectory(da,b,showVel,1.0,showAcc,1.0,nPts+1,nSkip,timeDelay) traj.run() |
From: <la...@lu...> - 2001-06-19 16:46:46
|
Hi Dean. I haven't used Jython specifically with WebLogic, but I have used Jython to communicate w/ EJBs on a Jboss server, which is similiar. It works very well. Let me know if you have any specific questions and if I have an answer for you I'll cough it up :) ----------------------------------------------------------------------------- Brian Knox Just Another Perl Hacker perl -le '$_="6110>374086;2064208213:90<307;55";tr[0->][ LEOR!AUBGNSTY];print' On Tue, 19 Jun 2001, Dean Thompson wrote: > Does anyone have experience running Jython in a WebLogic environment? I > think the most likely scenario for us would be to invoke Jython scripts from > within servlets, and then invoke further Java APIs from within those Jython > scripts. > > Dean > |
From: Don C. <don...@em...> - 2001-06-19 16:41:59
|
We use jython with Weblogic 5.1 for interactively testing EJBs. It works great. >-----Original Message----- >From: Dean Thompson [mailto:dth...@me...] >Sent: Tuesday, June 19, 2001 11:23 AM >To: jyt...@li... >Subject: [Jython-users] Running Jython within WebLogic > > > >Does anyone have experience running Jython in a WebLogic environment? I think the most likely >scenario for us would be to invoke Jython scripts from within servlets, and then invoke further > Java APIs from within those Jython scripts. > >Dean |
From: James H. <jh...@pa...> - 2001-06-19 16:23:40
|
We're using Jython in WL6.0 within Session beans.... seems to work fine with no hitches. (unlike JAXP1.1 compliant XML parsers, which WL6.0 can't get along with worth a darn.) James At 6/19/2001 11:22 AM -0400, Dean Thompson wrote: >Does anyone have experience running Jython in a WebLogic environment? I >think the most likely scenario for us would be to invoke Jython scripts >from within servlets, and then invoke further Java APIs from within those >Jython scripts. > >Dean |
From: Andrew B. <ab...@fa...> - 2001-06-19 16:14:47
|
> Does anyone have experience running Jython in a WebLogic > environment? I think the most likely scenario for us would > be to invoke Jython scripts from within servlets, and then > invoke further Java APIs from within those Jython scripts. A little bit of experimentation with org.python.util.PyServlet has me pretty excited - it seems very easy to configure so you can load your own python scripts (implementing HttpServlet) directly from your webapp's HTML root directory. The scripts can then load java classes from your webapp. I haven't tried it in WebLogic, but the configuration is very simple and should work in any Servlet 2.2-compliant container. In this model, the Jython script *is* the servlet, but it's pretty close to what you described... It seems like python servlets can even import other non-servlet python classes from the HTML root, but it's a little awkward, since they need to be imported by full package name, and the directory with the scripts in it must have an __init__.py in it for the import to work. Not worth complaining about, but it was a little tough to figure out... is there an easier way? Ideally, you'd be able to stick a few python files, including the servlet script, in some random directory under the web app; you'd invoke the jython servlet by its full name, but have the servlet be able to directly import other scripts in the same directory without needing to reference the name of the directory they're in. Seems like jython scripts could easily coexist with JSPs, placing objects in the request context and then forwarding to a JSP to do the presentation. I imagine it could integrate very nicely with Jakarta Struts, too - Python seems like a good language to implement Action classes in. Andy Boyko ab...@fa... |
From: Dean T. <dth...@me...> - 2001-06-19 15:25:01
|
Does anyone have experience running Jython in a WebLogic environment? I think the most likely scenario for us would be to invoke Jython scripts from within servlets, and then invoke further Java APIs from within those Jython scripts. Dean |
From: Dean T. <dth...@me...> - 2001-06-19 15:23:57
|
Can someone tell me the current status of Jython/JIT compatibility? I see warnings here and there on the web site, but they seem fairly old. I don't see any current traffic about it. Dean |
From: Brian Z. <bri...@ya...> - 2001-06-19 06:29:17
|
Yes it runs great if you can input by keyboard. It's so cool to have an on-device OO scripting language on top of a JVM. Steps involved: =========== 1. download from http://www.embedded.oti.com/ and install j9 to pocketpc \vame1.3, make sure you can run the demos 2. download jython2.1a1 from http://www.jython.org , copy \jython-2.1a1 to pocketpc \jython-2.1a1 3. copy Sun's JRE1.1.8 files from "C:\Program Files\JavaSoft\JRE\1.1" to pocketpc \JRE1.1 4. create a shortcut RunJython.lnk using the following 4 lines concated (on a single line seperated by " ") on your desktop PC and copy it to \jython-2.1a1: 119#"\vame1.3\j9.exe" "-bp:\vame1.3\classes.zip" "-cp:\JRE1.1\lib\rt.jar;\jython-2.1a1\jython.jar" "org.python.util.jython" Sample session: =============== Jython 2.1a1 on java1.2.2 subset (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import java >>> print java.util.Date() Mon Jun 18 23:15:28 PDT 2001 >>> import pystone >>> pystone.main() Pystone(1.1) time for 10000 passes = 202.265 This machine benchmarks at 49.4401 pystones/second >>> Wish: ===== 0. it's still too slow; 1. J9 Console gets updated so that it complies to latest pocketpc UI standard (right now the menubar is on the bottom, and the input text field gets blocked by the tiny keyboard); 2. We can do without rt.jar. I tried to put classes.zip into classpath but it does not work; without rt.jar jython cannot "import java". Any other idea? Congrats to the J9 team and the jython team! -Brian |
From: Danny A. <dan...@bt...> - 2001-06-18 22:50:13
|
I've just been looking at some of the intermediate Java code generated by jythonc on its way to a .class. I may be wrong, but it looks to me like the class is will effectively wrap up the python source, which will be interpreted by the interpreter embedded in jpython. To compile this up to native code, unless the compiler is *really* smart it would carry over all the inefficiencies of the interpretation process, and so I would guess that the performance improvements overall are likely to be minimal or non-existent, compared to running the Python source on a native interpreter. I guess. BTW, I've just been trying to find a good way of porting Python source over to Java, and made a small step forward using the Object Domain UML tool (time limited demo) - it can generate the Java classes and method shells (from UML generated from Python), which with a bit of search & replace (get rid of 'self'!) should save a fair bit of hand coding. --- Danny Ayers http://www.isacat.net >-----Original Message----- >From: jyt...@li... >[mailto:jyt...@li...]On Behalf Of VanL >Sent: 18 June 2001 21:21 >To: jyt...@li... >Subject: [Jython-users] Python to native compilation via java? > > >Hello, > >(Cross-posted by request from the python-tutor mailing list) > >I was reading about the new gcc 3.0 release, and something that caught >my eye: > >""" >The GNU Compiler for the Java Programming Language >What is GCJ? > >GCJ is a portable, optimizing, ahead-of-time compiler for the Java >Programming Language. It can compile: > > * Java source code directly to native machine code, > * Java source code to Java bytecode (class files), > * and Java bytecode to native machine code. > >Compiled applications are linked with the GCJ runtime, libgcj, which >provides the core class libraries, a garbage collector, and a bytecode >interpreter. libgcj can dynamically load and interpret class files, >resulting in mixed compiled/interpreted applications. >""" > >Would code get any significant speedup by going jython -> .class files >-> native? Is it possible? And does jython compile under gcj? > >Thanks, > >Van > > > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >http://lists.sourceforge.net/lists/listinfo/jython-users |
From: James H. <jh...@pa...> - 2001-06-18 20:51:53
|
Can someone tell me how stable / bug free version 2.1a1 is compared to 2.0? Is it usable without any issues? Thanks, James |
From: Steven M. C. <sca...@sa...> - 2001-06-18 20:43:46
|
A very good question! However, don't forget that if the software you're writing is GPL'd, there might be a restriction on compiling it together with jython, due to a conflict between the GPL and jython's license. VanL wrote: > > Hello, > > (Cross-posted by request from the python-tutor mailing list) > > I was reading about the new gcc 3.0 release, and something that caught > my eye: > > """ > The GNU Compiler for the Java Programming Language > What is GCJ? > > GCJ is a portable, optimizing, ahead-of-time compiler for the Java > Programming Language. It can compile: > > * Java source code directly to native machine code, > * Java source code to Java bytecode (class files), > * and Java bytecode to native machine code. > > Compiled applications are linked with the GCJ runtime, libgcj, which > provides the core class libraries, a garbage collector, and a bytecode > interpreter. libgcj can dynamically load and interpret class files, > resulting in mixed compiled/interpreted applications. > """ > > Would code get any significant speedup by going jython -> .class files > -> native? Is it possible? And does jython compile under gcj? > > Thanks, > > Van -- Steve Castellotti Systems Programmer School of Arts and Sciences, University of Pennsylvania |
From: <ma...@la...> - 2001-06-18 20:35:28
|
I was trying out a simplistic example that I /thought/ was something I'd done before, but I can't get it to work. Assuming a piece of Java that looks like this: public class A { public A() { System.out.println("new A"); } private void mA() { System.out.println("A's method"); } public class B { public B() { System.out.println("new B"); } private void mB() { System.out.println("B's method"); } public class C { public C() { System.out.println("new C"); } public void mC() { System.out.println("C's method"); mA(); mB(); } } } } How do I do, in Jython, the equivalent of this code: public class Foo { public static void main(String[] args) { A a = new A(); // a.mA(); // private mA: can't reach from here A.B b = a.new B(); // b.mB(); // private mB: can't reach from here A.B.C c = b.new C(); c.mC(); // public mC should have access to mA and mB } } My efforts at this are running into all kinds of visibility problems - instantiating an "A" is fine, but beyond that I'm not getting what I want. Feeling el-stupido, Mats |