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: Ype K. <yk...@xs...> - 2001-09-22 13:02:40
|
Frank, >If anyone will confirm this is the best way to use exec and globals, I would >certain appreciate your feedback. > >The goal is to have the Jython equivalent of server-side include files where >one script calls another and can share variables. In an experiment I created >two files: > >exec_example.py > >def makethecall: > i=100 > exec open("included.py").read() > print "j=", j >makethecall() > > >included.py > >j=101 >print "i=", i > >By running exec_example I see: > >i=100 >j=101 > >Is this the best way to have scripts calling other scripts and returning >results? This illustrates that the global namespace passed to exec is the local namespace of the makethecall function. You can have more control over the namespaces passed to exec by passing these as arguments, too. My guess is that you are going to need this. In this particular example I think I'd prefer to use execfile(), but that is rather minor. You could also note that: - the __name__ variable in the executed code will have the value of the __name__ variable at the exec call, which might not be desirable. - the function makethecall is defined when included.py is exec'ed, There are a few other things that are normally provided by jython itself for the code it executes that you might want to consider: In case you want to control import's in exec'ed code: - sys.modules might change during the exec when the executed code imports other modules. - neither exec nor execfile does any module administration in sys.modules. You can do this yourself by (temporarily) adding a new.module() to sys.modules. In case you want more control over imports in executed code you'll need to control sys.path too, as it determines the places from which modules can be loaded. The exec'ed code might throw - a jython exception. You might want to catch it. - a java exception that you cannot catch in jython. The exec'ed code might not return. This is rather hard to control, but it is possible in jython by using a (deprecated) java call to stop the thread doing the exec. Fortunately the python language does not encourage writing endless loops. The nice thing about python/jython is that you can control almost all of these aspects when using exec or execfile. The downside is off course that you might have to write the code to do some of this. If you'd like to see an example, let me know. Regards, Ype |
From: Frank C. <fc...@pu...> - 2001-09-22 06:36:27
|
Raj: From what I've seen and read about Jython's threading, I think Java threads are the better way to go. In your architecture you would write Java modules that implements Thread and handles all the get/set methods needed to set-up and operate the JDBC connection. Jython would instantiate your JDBC thread (or multiple threads to check scalability) and respond to result sets returned. I think you may find what you're wanting to build in Load, an open-source project I maintain. I am in the process of moving Load to use Jython as a script language. Details are at: http://www.pushtotest.com. And, of course, PushToTest has consulting solutions to add functions needed to test your application. Let me know if we can help. -Frank -- Frank Cohen, founder, PushToTest, www.pushtotest.com, phone: 408 374 7426 Come to PushToTest for Load, a free open-source tool for performance and scalability testing and data migration. > From: R Datta <rd...@cr...> > Date: Thu, 20 Sep 2001 12:11:40 -0700 > To: jyt...@li... > Subject: [Jython-users] Multithreading in Jython > > Hi all, > > I am working on a program to simulate stress testing (large number of > users) on JDBC connections. I would like to multithread the JDBC operations. > > I would appreciate some input (samples, tips etc) with anyone that has > tried multithreading within jython scripts. > > Thanks > Raj > > Thanks > Raj Datta > Professional Services Direct : 408-530-4932 > CrossAccess Corp Cell : 408-316-5473 > 2900 Gordon Ave #100 Fax : 408-735-0328 > Santa Clara CA 95051 Email : rd...@cr... > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Frank C. <fc...@pu...> - 2001-09-22 06:28:01
|
I've been looking into the OpenSSL project. Do you know if they are the providers of the JDK 1.4 SSL? -Frank -- Frank Cohen, founder, PushToTest, www.pushtotest.com, phone: 408 374 7426 Come to PushToTest for Load, a free open-source tool for performance and scalability testing and data migration. > From: Ted Berg <te...@et...> > Reply-To: te...@et... > Date: Fri, 21 Sep 2001 11:45:41 -0700 > To: Ype Kingma <yk...@xs...>, jyt...@li... > Subject: Re: [Jython-users] Basic newbie questions: threads, spawning apps, > SSL > > On Friday 21 September 2001 12:03, Ype Kingma wrote: > > >>> 3) Will someone point me in the right direction to do SSL in Jython. >> >> That's more difficult: in jython you're limited to what java can >> offer you, and I don't recall having secure sockets in java.net. >> You might try to find any java implementation of secure sockets. >> > > As of 1.4 SSL is supported in java. I haven't played with it myself, so > that's all I can tell you. > > JDK1.4 beta 2 is available from javasoft.com, but is not yet ready for public > consumption. Personally, I've had no trouble with it. > > > ted > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Samuele P. <pe...@in...> - 2001-09-22 03:15:40
|
Hi. > Can anyone explain why the attached simple Java program which creates one > PythonInterpreter and then does an eval in a continuous loop using so much > memory on Windows 2000 and Linux? Is it a Java problem or a Jython > problem? Can it be fixed? Given your data it seems an IBM Java problem ;) Seriously the only potential memory leak that I see is with the all classes dynamically loaded if the VM does not discard them at some point, which is not mandatory (see the JLS) but should be a reasonable behavior ;) With the Sun HotSpot you have a -verbose:class option. Don't know about the IBM VM. Here is what you see running your code: a bunch of dynamical class loading: [Loaded org.python.pycode._pyx4667] [Loaded org.python.pycode._pyx4668] [Loaded org.python.pycode._pyx4669] [Loaded org.python.pycode._pyx4670] [Loaded org.python.pycode._pyx4671] [Loaded org.python.pycode._pyx4672] [Loaded org.python.pycode._pyx4673] [Loaded org.python.pycode._pyx4674] [Loaded org.python.pycode._pyx4675] [Loaded org.python.pycode._pyx4676] [Loaded org.python.pycode._pyx4677] [Loaded org.python.pycode._pyx4678] [Loaded org.python.pycode._pyx4679] ... [Unloading class org.python.pycode._pyx6636] [Unloading class org.python.pycode._pyx6538] [Unloading class org.python.pycode._pyx6593] [Unloading class org.python.pycode._pyx6598] [Unloading class org.python.pycode._pyx7066] [Unloading class org.python.pycode._pyx7002] [Unloading class org.python.pycode._pyx6510] [Unloading class org.python.pycode._pyx6785] [Unloading class org.python.pycode._pyx6621] [Unloading class org.python.pycode._pyx6892] [Unloading class org.python.pycode._pyx6863] [Unloading class org.python.pycode._pyx6707] [Unloading class org.python.pycode._pyx6633] but also a bunch of class unloading. If the IBM VM have similar tools, you could try to investigate the problem. With the old sun 1.2 -verbose:class did'nt show class unloading but -verbose:gc did. regards. > On a Windows 2000 system with 128M memory using IBM Java 1.3.0 (20010609) > with the JIT on, java.exe's memory usage for this program steadily > increases and performance decreases. Eventually I get an OutOfMemory > message. > > Elapsed time Memory Usage Time to complete 10,000 loops > ------------ ------------ ----------------------------- > 1 minute 26,108 K 31 seconds > 20 minutes 121,696 K 70 seconds > 54 minutes 185,132 K 116 seconds > > A similar memory increase and performance degradation is true running this > program on a Linux Redhat 7.1 system with 256M memory and using IBM Java > 1.3.0 (20010626) with the JIT on. > > However, on a Windows ME system with 64M memory using Sun Java 1.3.1 > (HotSpot), there is no increase in memory usage and no performance > degradation, even after this program has run for 24 hours. > > Here's the code for the SimpleEmbedded Java program that's running: > > import org.python.util.PythonInterpreter; > import org.python.core.*; > > public class SimpleEmbedded { > > public static void main(String []args) throws PyException { > > PythonInterpreter interp = new PythonInterpreter(); > > interp.exec("import time"); > interp.exec("LoopStartTime = time.time()"); > > int i = 1; > while (i > 0) > { > interp.eval("'This is a test'"); > > if (i % 10000 == 0) > { > interp.exec("LoopStopTime = time.time()"); > interp.exec("LoopElapsedSecs = LoopStopTime - > LoopStartTime"); > System.out.println("Completed Loop " + i + > " - elapsed time: " + interp.get("LoopElapsedSecs") + > " secs"); > interp.exec("LoopStartTime = time.time()"); > } > i++; > } > > } > } |
From: Sharon L. <lu...@us...> - 2001-09-21 23:48:53
|
Can anyone explain why the attached simple Java program which creates one PythonInterpreter and then does an eval in a continuous loop using so much memory on Windows 2000 and Linux? Is it a Java problem or a Jython problem? Can it be fixed? On a Windows 2000 system with 128M memory using IBM Java 1.3.0 (20010609) with the JIT on, java.exe's memory usage for this program steadily increases and performance decreases. Eventually I get an OutOfMemory message. Elapsed time Memory Usage Time to complete 10,000 loops ------------ ------------ ----------------------------- 1 minute 26,108 K 31 seconds 20 minutes 121,696 K 70 seconds 54 minutes 185,132 K 116 seconds A similar memory increase and performance degradation is true running this program on a Linux Redhat 7.1 system with 256M memory and using IBM Java 1.3.0 (20010626) with the JIT on. However, on a Windows ME system with 64M memory using Sun Java 1.3.1 (HotSpot), there is no increase in memory usage and no performance degradation, even after this program has run for 24 hours. Here's the code for the SimpleEmbedded Java program that's running: import org.python.util.PythonInterpreter; import org.python.core.*; public class SimpleEmbedded { public static void main(String []args) throws PyException { PythonInterpreter interp = new PythonInterpreter(); interp.exec("import time"); interp.exec("LoopStartTime = time.time()"); int i = 1; while (i > 0) { interp.eval("'This is a test'"); if (i % 10000 == 0) { interp.exec("LoopStopTime = time.time()"); interp.exec("LoopElapsedSecs = LoopStopTime - LoopStartTime"); System.out.println("Completed Loop " + i + " - elapsed time: " + interp.get("LoopElapsedSecs") + " secs"); interp.exec("LoopStartTime = time.time()"); } i++; } } } -------------------------------------------------------------- Sharon Lucas IBM Austin, lu...@us... (512) 838-8347 or Tieline 678-8347 |
From: Frank C. <fc...@pu...> - 2001-09-21 20:40:53
|
Thank you for the information. This worked great! I need to create a Java object that does a URLConnection to an SSL web site. I'll write up my notes and share it with the Jython-users list once I figure out how to do it. Thanks. -Frank -- Frank Cohen, founder, PushToTest, www.pushtotest.com, phone: 408 374 7426 Come to PushToTest for Load, a free open-source tool for performance and scalability testing and data migration. > From: Ype Kingma <yk...@xs...> > Date: Fri, 21 Sep 2001 20:03:36 +0100 > To: jyt...@li... > Subject: Re: [Jython-users] Basic newbie questions: threads, spawning apps, > SSL > > Frank, > >> Some newbie questions. Thanks, in advance, for answering them. >> >> 1) How do I find implemented methods and objects? For example, A Python book > > You can use: > dir(o) > dir(o.__class__) > >> shows how to use thread.start_new(count, (i, 3)) which generates this error: >> AttributeError: class "org.python.modules.thread' has no attribute >> 'start_new'. I'd like something - even the JavaDoc - that would help me find >> and fix the problem. > > It's called thread.start_new_thread() > (http://www.python.org/doc/current/lib/module-thread.html) > >> 2) Does Jython have an ability to handle "include" files? For eample, I have >> one Jython script that calls a Jython script file and passes control to the >> new script. > > You can use execfile(). > (http://www.python.org/doc/current/lib/built-in-funcs.html) > >> 3) Will someone point me in the right direction to do SSL in Jython. > > That's more difficult: in jython you're limited to what java can > offer you, and I don't recall having secure sockets in java.net. > You might try to find any java implementation of secure sockets. > > Good luck, > Ype > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Frank C. <fc...@pu...> - 2001-09-21 20:39:50
|
If anyone will confirm this is the best way to use exec and globals, I would certain appreciate your feedback. The goal is to have the Jython equivalent of server-side include files where one script calls another and can share variables. In an experiment I created two files: exec_example.py def makethecall: i=100 exec open("included.py").read() print "j=", j makethecall() included.py j=101 print "i=", i By running exec_example I see: i=100 j=101 Is this the best way to have scripts calling other scripts and returning results? -Frank -- Frank Cohen, founder, PushToTest, www.pushtotest.com, phone: 408 374 7426 Come to PushToTest for Load, a free open-source tool for performance and scalability testing and data migration. |
From: Ype K. <yk...@xs...> - 2001-09-21 18:46:48
|
John, >I'd like to allow users of my app to be able to enter Jython code to >control my app. But I only want to support a subset of the language. > >Ideally I'd like to look at the description of the Jython language in >the form of a hierarchy and pick and choose what to activate and what >to suppress. For example, I'd like support for assignment statements >but not the creation of classes. > >Does this sound like a reasonable goal? Is anything like this possible >w/o a lot of work? You can use execfile() or exec in you program, and perform some simple check on the actual program contents before allowing this. Eg. to define a class in python the word 'class' must be at the beginning of a line (after evt. whitespace). You can easily search for that using regular expressions, and give the user some error message when this happens. Same for 'import'. Beware of the standard functions: for example anything goes when you allow __import__() or exec or execfile() in user code. When the subset is easy enough you might define a simple parser for it and use it as a check before executing the code by the full interpreter. However, I don't like the idea of giving users anything less than the full python language. Most of them can decide how much of the language they would want to use. Using your own parser as a filter at least allows an 'upgrade' to the full language... Have fun, Ype |
From: Ted B. <te...@et...> - 2001-09-21 18:46:05
|
On Friday 21 September 2001 12:03, Ype Kingma wrote: > >3) Will someone point me in the right direction to do SSL in Jython. > > That's more difficult: in jython you're limited to what java can > offer you, and I don't recall having secure sockets in java.net. > You might try to find any java implementation of secure sockets. > As of 1.4 SSL is supported in java. I haven't played with it myself, so that's all I can tell you. JDK1.4 beta 2 is available from javasoft.com, but is not yet ready for public consumption. Personally, I've had no trouble with it. ted |
From: John M. <joh...@ya...> - 2001-09-21 18:24:02
|
I'd like to allow users of my app to be able to enter Jython code to control my app. But I only want to support a subset of the language. Ideally I'd like to look at the description of the Jython language in the form of a hierarchy and pick and choose what to activate and what to suppress. For example, I'd like support for assignment statements but not the creation of classes. Does this sound like a reasonable goal? Is anything like this possible w/o a lot of work? __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ |
From: John M. <joh...@ya...> - 2001-09-21 18:18:50
|
Attached is an pair of example programs that compare the single threading in CPython with the true multi-threading by using the Java threads. utah: /home/mudd/misc[1] ls ?ThreadTestSerialize.py cThreadTestSerialize.py jThreadTestSerialize.py utah: /home/mudd/misc[1] cThreadTestSerialize.py self.id=1 self.id=2 self.id=0 Elapsed: 0.1126 sec utah: /home/mudd/misc[1] jThreadTestSerialize.py self.id=2 self.id=0 self.id=1 Elapsed: 0.2870 sec utah: /home/mudd/misc[1] --- R Datta <rd...@cr...> wrote: > Hi all, > > I am working on a program to simulate stress testing (large number of > > users) on JDBC connections. I would like to multithread the JDBC > operations. > > I would appreciate some input (samples, tips etc) with anyone that > has > tried multithreading within jython scripts. > > Thanks > Raj > > Thanks > Raj Datta > Professional Services Direct : > 408-530-4932 > CrossAccess Corp Cell : > 408-316-5473 > 2900 Gordon Ave #100 Fax : 408-735-0328 > Santa Clara CA 95051 Email : > rd...@cr... > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ |
From: Ype K. <yk...@xs...> - 2001-09-21 17:56:20
|
Frank, >Some newbie questions. Thanks, in advance, for answering them. > >1) How do I find implemented methods and objects? For example, A Python book You can use: dir(o) dir(o.__class__) >shows how to use thread.start_new(count, (i, 3)) which generates this error: >AttributeError: class "org.python.modules.thread' has no attribute >'start_new'. I'd like something - even the JavaDoc - that would help me find >and fix the problem. It's called thread.start_new_thread() (http://www.python.org/doc/current/lib/module-thread.html) >2) Does Jython have an ability to handle "include" files? For eample, I have >one Jython script that calls a Jython script file and passes control to the >new script. You can use execfile(). (http://www.python.org/doc/current/lib/built-in-funcs.html) >3) Will someone point me in the right direction to do SSL in Jython. That's more difficult: in jython you're limited to what java can offer you, and I don't recall having secure sockets in java.net. You might try to find any java implementation of secure sockets. Good luck, Ype |
From: Phil S. <psu...@es...> - 2001-09-21 16:14:39
|
os to the os.chdir() thing, check out http://sourceforge.net/projects/jnios. A few people have been talking about it recently on the list. I tried it out, it works very well. It uses JNI so it will not be an option in some cases. pipe() doesn't work and it may not work under linux, though I'm hoping a good linux person may solve that. To use jnios, extract it and do something like this: d:\projects>set path=d:\tools\jnios-1.7;%path% d:\projects>set classpath=d:\tools\jnios-1.7\jnios.jar d:\projects>jython -Dpython.path=d:\tools\jnios-1.7 Jython 2.1a3 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> from jnios import os >>> os.chdir(r'\temp') >>> os.getcwd() 'd:\\temp' Note that the jnios readme has instructions for making jnios your default os package, obviating the need for the from jnios import os statement. As to popitem(): 2.1a3 supports it. But note that it does not show up in the dir()?! d:\projects>jython -Dpython.path=d:\tools\jnios-1.7 Jython 2.1a3 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> a = {1:2, 3:4} >>> dir(a) ['clear', 'copy', 'get', 'has_key', 'items', 'keys', 'setdefault', 'update', 'values'] >>> a.popitem() (3, 4) >>> d:\projects>python Python 2.1 (#15, Apr 16 2001, 18:25:49) [MSC 32 bit (Intel)] on win32 Type "copyright", "credits" or "license" for more information. >>> a = {1:2, 3:4, 5:6} >>> dir(a) ['clear', 'copy', 'get', 'has_key', 'items', 'keys', 'popitem', 'setdefault', 'update', values'] >>> IMHO jython 2.1a3 is much better than Jython 2.0. Like you I stayed away from it for a while because I prefer to avoid alpha software, but it seems at least as stable as 2.0 to me and there are fewer python/jython incompatibilities. -----Original Message----- From: Mark Robinson [mailto:blo...@ho...] Sent: Friday, September 21, 2001 11:18 AM To: jyt...@li... Subject: [Jython-users] no popitem in jython 2.0 I am currently in the process of converting an application I wrote in python to jython, so I can use swing for a GUI. As far as GUI side goes so, excellent stuff, consider my socks impressed off my feet. However, there seem to be a number of python functionality, that is missing in jython. Earlier today I realised I could no longer use the os.chdir() method, and I have just noticed that popitem() is not supported for dictionary objects (at least in version 2.0, which was the latest stable release as far as I can see) Can anyone tell me if this is just a work in progress situation, and these features are just waiting to added or if they haven't been added for some particular reason. Secondly, can anyone tell me if there are any other issues I may have with code breakage moving from python2.1 to jython2.0? Please don't get the wrong idea here, I think jython is wonderful to use, and has saved me hours of work already ;), I am just trying to evaluate just how much the differences are going to affect me. cheers Blobby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Mark R. <blo...@ho...> - 2001-09-21 15:38:19
|
Hey guys, I have just downloaded version 2.1a3 (so I can use many of the python 2.1 compatible features). The self extraction and installation seeming to go fine with no errors, but when I type jython, it pauses and then just returns to the command line. can anyone help me get this working? Blobby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Mark R. <blo...@ho...> - 2001-09-21 15:18:12
|
I am currently in the process of converting an application I wrote in python to jython, so I can use swing for a GUI. As far as GUI side goes so, excellent stuff, consider my socks impressed off my feet. However, there seem to be a number of python functionality, that is missing in jython. Earlier today I realised I could no longer use the os.chdir() method, and I have just noticed that popitem() is not supported for dictionary objects (at least in version 2.0, which was the latest stable release as far as I can see) Can anyone tell me if this is just a work in progress situation, and these features are just waiting to added or if they haven't been added for some particular reason. Secondly, can anyone tell me if there are any other issues I may have with code breakage moving from python2.1 to jython2.0? Please don't get the wrong idea here, I think jython is wonderful to use, and has saved me hours of work already ;), I am just trying to evaluate just how much the differences are going to affect me. cheers Blobby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Carlos Q. <car...@rt...> - 2001-09-21 13:31:04
|
HI I'm just downloading Python 2.1.1 and notice that the license changed so now it is GPL-compatible. Will this happen to jython as well? Regards |
From: Sebastien P. <Seb...@is...> - 2001-09-21 12:45:08
|
Mark Robinson wrote: > Thanks!! I guess the java/jython way to do this is store the path > and use the full path when writing files, rather than switching > directories. It was probably bad practice anyhow ;), I exhibit lots > of that. > > It does seem strange that java doesn't have these capabilities, > is it due to security do you know? Well, I don't think it is a "security feature", because applets cannot do what an application can do. As I've said you can set a property in the JVM (something like "java.currentPath"), actually the Ant build tool surely uses that when it runs a new program- maybe you could post on their mailing list... but I'm curious to know why Sun hasen't put a changeCurrentDir in the System class ;) Cheers, -- Sebastien. |
From: Mark R. <blo...@ho...> - 2001-09-21 12:10:02
|
>From: Sebastien Pierre <Seb...@is...> >To: Mark Robinson <blo...@ho...> >Subject: Re: [Jython-users] no os.chdir() in jython? >Date: Fri, 21 Sep 2001 11:58:50 +0200 > > > > I have just found out that the os module in jython doesn't > > include the os.chdir() method. Can anyone tell me how it's > > functionality is usually achieved in jython? > >From what I know about Java, there is no way to change the current >directory...Thought maybe using the JVM properties, but I don't remember >the property name. Thanks!! I guess the java/jython way to do this is store the path and use the full path when writing files, rather than switching directories. It was probably bad practice anyhow ;), I exhibit lots of that. It does seem strange that java doesn't have these capabilities, is it due to security do you know? cheers blobby > >Cheers, > > -- Sebastien. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Mark R. <blo...@ho...> - 2001-09-21 09:35:43
|
Hey guys, I have just found out that the os module in jython doesn't include the os.chdir() method. Can anyone tell me how it's functionality is usually achieved in jython? thanks blobby _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Frank C. <fc...@pu...> - 2001-09-21 07:56:18
|
Some newbie questions. Thanks, in advance, for answering them. 1) How do I find implemented methods and objects? For example, A Python book shows how to use thread.start_new(count, (i, 3)) which generates this error: AttributeError: class "org.python.modules.thread' has no attribute 'start_new'. I'd like something - even the JavaDoc - that would help me find and fix the problem. 2) Does Jython have an ability to handle "include" files? For eample, I have one Jython script that calls a Jython script file and passes control to the new script. 3) Will someone point me in the right direction to do SSL in Jython. Thanks. -Frank -- Frank Cohen, founder, PushToTest, www.pushtotest.com, phone: 408 374 7426 Come to PushToTest for Load, a free open-source tool for performance and scalability testing and data migration. |
From: Kevin M. <kev...@er...> - 2001-09-21 06:40:24
|
Success! I was being a little hasty when I tested and had a typo in the Class-Path. I have so quickly gotten used to be being able to just do something in Jython and having it work right away that this bug just threw me. Thanks for your time and patience. Best regards, Kevin. On Thu, 20 Sep 2001, Samuele Pedroni wrote: > > Result: > > ------- > > I have stopped adding the Class-Path field to the manifest, since Samuel > > said that it ignores this and I can confirm it is so. > > > It's tricky. I said that Jython ignores not Java. > So the sys.add_package makes Jython aware of the package, > but Jython uses Java to import the class > so Java should know the jar, > you need both the sys.add_package and the Class-Path in > the manifest, if then it's still not working > is just a matter of getting Class-Path right ;) > > regards, Samuele Pedroni. > _________________________________________________ Name/Title : Kevin McNamee, Software Consultant Phone : +46 13 32 1165 |
From: Kevin B. <kb...@ca...> - 2001-09-20 21:07:45
|
Here's a little sample code. --- from threading import Thread from time import time class Job( Thread ): def run( self ): v = 0L for i in xrange( 1, 200000 ): v = v + i self.value = v def _test( n=1 ): jobs = [] for i in range( n ): jobs.append( Job() ) start = time() map( Job.start, jobs ) map( Job.join, jobs ) t = time() - start print "%d: %.3f/%.3f" % (n, t, n and t/n) map( _test, range( 5 )) --- Note that the example above doesn't get a speedup from multiple threads, even on a two CPU box. Of course, if your threads are blocking on a JDBC call, you'll see a speedup... :-) <ObDisc> These are microbenchmarks are thus not worth the electrons it takes to view them. </ObDisc> Although Jython doesn't appear to have a "global interpreter lock" a la CPython, my 2-CPU NT box shows 1 CPU utilized for 1 thread, both CPUs fully utilized for two or more threads, but the times look like: 0: 0.000/0.000 1: 0.719/0.719 2: 1.656/0.828 3: 2.485/0.828 4: 3.329/0.832 So, more threads use more CPU, but are slightly slower, even on a two-CPU box. If you just run the 'run' method of all the jobs, instead of starting a new thread for each of them, you get better times: 0: 0.000/0.000 1: 0.656/0.656 2: 1.297/0.648 3: 1.953/0.651 4: 2.594/0.648 FWIW, the numbers for CPython are much worse (thank that global interpreter lock): 0: 0.000/0.000 1: 0.703/0.703 2: 5.360/2.680 3: 10.969/3.656 4: 11.656/2.914 CPython only uses one CPU, but still incurs the overhead of thread switching - not a pretty picture. These results were obtained on: Jython 2.1a1 on java1.3.0 (JIT: null) Sun JDK 1.3.0 WinNT 4.0 SP 6a 2x PIII 600 kb R Datta wrote: > > Hi all, > > I am working on a program to simulate stress testing (large number of > users) on JDBC connections. I would like to multithread the JDBC operations. > > I would appreciate some input (samples, tips etc) with anyone that has > tried multithreading within jython scripts. > > Thanks > Raj > > Thanks > Raj Datta > Professional Services Direct : 408-530-4932 > CrossAccess Corp Cell : 408-316-5473 > 2900 Gordon Ave #100 Fax : 408-735-0328 > Santa Clara CA 95051 Email : rd...@cr... > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: R D. <rd...@cr...> - 2001-09-20 19:12:13
|
Hi all, I am working on a program to simulate stress testing (large number of users) on JDBC connections. I would like to multithread the JDBC operations. I would appreciate some input (samples, tips etc) with anyone that has tried multithreading within jython scripts. Thanks Raj Thanks Raj Datta Professional Services Direct : 408-530-4932 CrossAccess Corp Cell : 408-316-5473 2900 Gordon Ave #100 Fax : 408-735-0328 Santa Clara CA 95051 Email : rd...@cr... |
From: Samuele P. <pe...@in...> - 2001-09-20 15:06:25
|
> Result: > ------- > I have stopped adding the Class-Path field to the manifest, since Samuel > said that it ignores this and I can confirm it is so. > It's tricky. I said that Jython ignores not Java. So the sys.add_package makes Jython aware of the package, but Jython uses Java to import the class so Java should know the jar, you need both the sys.add_package and the Class-Path in the manifest, if then it's still not working is just a matter of getting Class-Path right ;) regards, Samuele Pedroni. |
From: Noel R. <no...@ya...> - 2001-09-20 14:47:52
|
> >F5 - Import the current buffer into the interpreter (or reload) > >And Run buffer (with and without step debugging) Attached is a JEdit macro that will run Jython on the current buffer and place the output in the JEdit console. It's only a couple of lines long, so should be easily adaptable to your own environment. Place it in the jEdit/macros/Console_Plugin directory, and restart JEdit. Once it's there, it'll show up in the Macros >> Console Plugin menu, and you can assign a key shortcut to it. It doesn't integrate with the JythonInterpreter plugin, but it's still pretty nice to have. Noel |