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: Deirdre S. M. <de...@de...> - 2001-04-25 17:59:16
|
All the instructions linked from the Jython page on Macintosh installations talk about classic MacOS. However, MacOS X is Unix -- and very different. Has anyone else installed Jython on MacOS X? If so, where did you install it? I'm sorry to ask trivial questions but: a) my MacOS X development skills are rusty (part of why I'm doing this) b) I wanted to see if I could write Jython code that hooked up to Interface Builder -- _Deirdre Stash-o-Matic: http://weirdre.com http://deirdre.net "I love deadlines. I like the whooshing sound they make as they fly by." - Douglas Adams |
From: Eric F. <eri...@ny...> - 2001-04-25 10:09:08
|
I would like to integrate some jython into a java source tree. Some of my python modules will need to import classes defined in this project, and in at least one case, I need to implement a jython class with multiple inheritance from a java class and a java interface. How must I do this? Finally, are jython objects serializable? A demo sourcetree of a trival hybrid jython & java program would be VERY helpful. Many thanks, Eric --- Eric Freudenthal // Courant Institute // New York University office: 212-998-3345 // cell:917-279-6208 715 Broadway, Room 1011, New York, NY 10003 cell pager: eri...@fr... (100 char limit) |
From: Paolo T. <Pao...@ma...> - 2001-04-24 13:47:22
|
Hi. It's again me. I followed your istruction and I create a registry file where set up some properties. How can I add (and not substitute!) an extra path. In other words? In jyhton script I do: /usr/j2se/jre/bin/java -Dpython.home=${HOME}/.jythonhome -Dpython.path =/export/skel/omc-user/pythonmodules And in $HOME/.jythonhome/registry I wrote the following: python.path=mylocaldir In this way I just substitute the path. I would like to know how to add mylocaldir to that is set in command line. Anyone knows how to do that ? Thanks in advance. Paolo. |
From: <Ron...@Ne...> - 2001-04-24 12:08:14
|
Jython is Java oriented when it comes to system-related behavior - they both use properties and not environment variable. See the user notes at the home page; look for the info on properties. "Paolo Tortora" <Pao...@ma...>@lists.sourceforge.net on 04/24/2001 04:39:10 AM Sent by: jyt...@li... To: jyt...@li... cc: Subject: [Jython-users] Jython PYTHONPATH and PYTHONSTARTUP Hi I tried to use PYTHONPATH and PYTHONSTARTUP system variable, either for looking for importing modules and execute them in interactive start-up (as explained in python documentation). Thery doesn't work with jython 2.0. I also tried to use CLASSPATh for searching modules but doesn't work as too. Anyone knows how to do that ? Thank you. Paolo. _______________________________________________ Jython-users mailing list Jyt...@li... http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Paolo T. <Pao...@ma...> - 2001-04-24 08:42:59
|
Hi I tried to use PYTHONPATH and PYTHONSTARTUP system variable, either for looking for importing modules and execute them in interactive start-up (as explained in python documentation). Thery doesn't work with jython 2.0. I also tried to use CLASSPATh for searching modules but doesn't work as too. Anyone knows how to do that ? Thank you. Paolo. |
From: Adam B. <sir...@ya...> - 2001-04-24 04:57:45
|
Blech... where's that unsend button! Unsend! Unsend! Yeah. I see. Ignore me. Please? Adam __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Adam B. <sir...@ya...> - 2001-04-24 04:53:30
|
Is there a reason that Jython is not available as a single .jar file, perhaps with seperate documentation? In terms of incorporating it into another project, it is much simpler (and more graceful) to add a jar to a classpath than to deal with getting the source, compiling it, and having it clog both your sourcepath and classpath with many files. While I understand the desire to ship source, so that users can see it / help with it (and, indeed, I hope to contribute about a few points soon), it is easier for the end user if there is a jar option. Thoughts? Adam Also, it's entirely possible I'm just missing it, and it's sitting right on the server somewhere. If so, I deserve to be flamed, but flame me nicely, it's late. :-) __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Jim A. <ji...@tr...> - 2001-04-23 16:24:47
|
Uncle Roastie wrote: > Question: On pages 9.21 and 9.23 you show how > to use "glob()" in Jython, and then you add that it > is not part of the standard Jython package. Fresh jython 2.1a1 on Win98, no C-Python: >>> from glob import glob >>> glob("*.*") ['LICENSE.txt', 'README.txt', 'jython.jar', 'jython.bat', 'jythonc.bat', 'Uninst all.class', 'console.bat'] Bruce Eckel may have been using an earlier version? -- __o Jim Adrig _ \<,_ ji...@tr... ' `/ ' ` ___________ `-' `-' "There are many ways of moving forward, but only one way of standing still." - Franklin D. Roosevelt |
From: brian z. <bz...@zi...> - 2001-04-23 12:40:44
|
Paolo, The problem is you have not defined Count to be global in set() so a lccal variable called Count is being set with the value of newrc, not the top level variable as you expected. To fix it: def set(newc): global Count Count = newc However, this is considered very bad practice. Instead, try to build a class which contains the state, such as: class Counter: def __init__(self): self.count = 0 c = Counter() print c.count c.count = 5 print c.count While this is a bit bigger step conceptually, it will pay dividends as the scoping will be much easier to maintain. hope this helps, brian > > Hi. > > I have some problem to set a moduel variable into a function. > > I worte the following python module: > > ##Module mymodule.py > > Count = 0 > > def get(): > return Count > > def set(newc): > Count = newc > > > >From prompt I type: > >>> import mymodule > >>> mymodule.get() > 0 > >>> mymodule.set(5) > >>> mymodule.get() > 0 > > I was expecting 5 ! > > Anyone knows my mistake ? > > Thank you in advance. > Paolo. |
From: Samuele P. <pe...@in...> - 2001-04-23 12:36:49
|
Hi. [Paolo Tortora] > Hi. > > I have some problem to set a moduel variable into a function. > > I worte the following python module: > > ##Module mymodule.py > > Count = 0 > > def get(): > return Count > > def set(newc): > Count = newc In python (this is not jython specific) an assignment in a function implicitly declare the assigned var as *local* to the function def set(newc): Count = newc # implicilty declare a local Count var (unrelated to global one) If you want to change a global var you should be explicit about that: def set(newc): global Count Count = newc regards |
From: Paolo T. <Pao...@ma...> - 2001-04-23 12:21:31
|
Hi. I have some problem to set a moduel variable into a function. I worte the following python module: ##Module mymodule.py Count = 0 def get(): return Count def set(newc): Count = newc From prompt I type: >>> import mymodule >>> mymodule.get() 0 >>> mymodule.set(5) >>> mymodule.get() 0 I was expecting 5 ! Anyone knows my mistake ? Thank you in advance. Paolo. |
From: <bc...@wo...> - 2001-04-22 18:36:09
|
[Uncle Roastie] >I'm operating under the impression that JPython cannot use CPython code. That depends on the module. Most modules works with both Jython and CPython. >Brian Zimmer's additional comment suggests the same thing that >John Mudd says - just import glob from CPython. Correct. In fact the glob.py module distributed with Jython-2.0 is a binary copy taken from CPython-2.0 >There is something conceptually that I'm missing here. >Why isn't something like the CPython glob module a part of >the JPython distribution It is. It will be installed when the "Library modules" checkbox is selected during installation. >if they can interoperate? Are we expected to >have both distributions on our search paths - No. By default the installation will install a selfcontained jython environment. Some users with more advanced requirements can have both distributions on the search path. >but then, if that is >the case, why does JPython duplicate so much of CPython? ??? What are you saying here? A major part of the CPython standard library is distributed with Jython exactly because that part works with Jython. >There is some missing concept here that I haven't pick up on. >I don't think JPython and CPython are meant to interoperate. Yes they are. To the fullest extend possible. >Bruce Eckels says in his excellent "Thinking in Patterns" that >you can use things like the glob module, but where does it come from, >since it's not in JPython/Jython, It is in Jython-2.0. >and I'm still making the assumption >that CPython and JPython do not interoperate? Not all CPython modules can work in jython. Some modules depend on dll/.so extension, others depend on the CPython implementation such as the Python byte codes and yet other modules fails because of bugs in Jython. >I think the answer hasn't been made yet, which is why I'm still asking >questions. I hope the question have been answered now. regards, finn |
From: John M. <joh...@ya...> - 2001-04-22 18:30:53
|
The JPython (not Jython) page suggests installing the CPython 1.5.2 libs. See: http://www.jpython.org/download.html I'm not sure if this is still necessary though. (1) Download pylib152e.jar (2) jython -jar pylib152e.jar --- Uncle Roastie <ro...@ro...> wrote: > I'm operating under the impression that JPython cannot use CPython > code. > Brian Zimmer's additional comment suggests the same thing that > John Mudd says - just import glob from CPython. > > There is something conceptually that I'm missing here. > Why isn't something like the CPython glob module a part of > the JPython distribution if they can interoperate? Are we expected > to > have both distributions on our search paths - but then, if that is > the case, why does JPython duplicate so much of CPython? > > There is some missing concept here that I haven't pick up on. > I don't think JPython and CPython are meant to interoperate. > Bruce Eckels says in his excellent "Thinking in Patterns" that > you can use things like the glob module, but where does it come > from, > since it's not in JPython/Jython, and I'm still making the assumption > that CPython and JPython do not interoperate? > > I think the answer hasn't been made yet, which is why I'm still > asking > questions. > > > > ----- Original Message ----- > From: John Mudd <joh...@ya...> > To: Uncle Roastie <ro...@ro...> > Sent: Sunday, April 22, 2001 12:08 PM > Subject: Re: [Jython-users] Jython/Thinking in Patterns Question > > > > I seem to be able to access glob. You can't? Maybe I installed > the > > python 1.5.2 libs. > > > > $ jython > > Jython 2.1a1 on java1.2.2-RC2 (JIT: javacomp) > > Type "copyright", "credits" or "license" for more information. > > >>> import glob > > >>> dir(glob) > > ['__all__', '__doc__', '__file__', '__name__', 'fnmatch', 'glob', > > 'glob1', 'has_magic', 'magic_check', 'os', 're'] > > >>> > > > > --- Uncle Roastie <ro...@ro...> wrote: > > > Bruce, > > > > > > "Thinking in Patterns", chapter 9 on the Jython interpreter, > > > has been invaluable to me at work. > > > > > > Question: On pages 9.21 and 9.23 you show how > > > to use "glob()" in Jython, and then you add that it > > > is not part of the standard Jython package. > > > > > > So, where can we find this beast? > > > And any other similar furry creatures that might exist. > > > > > > Thanks, > > > > > > Ron > > > > > > ron...@ne... (W) > > > ro...@ro... (H) > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Auctions - buy the things you want at great prices > > http://auctions.yahoo.com/ > > > __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Uncle R. <ro...@ro...> - 2001-04-22 18:09:34
|
I'm operating under the impression that JPython cannot use CPython code. Brian Zimmer's additional comment suggests the same thing that John Mudd says - just import glob from CPython. There is something conceptually that I'm missing here. Why isn't something like the CPython glob module a part of the JPython distribution if they can interoperate? Are we expected to have both distributions on our search paths - but then, if that is the case, why does JPython duplicate so much of CPython? There is some missing concept here that I haven't pick up on. I don't think JPython and CPython are meant to interoperate. Bruce Eckels says in his excellent "Thinking in Patterns" that you can use things like the glob module, but where does it come from, since it's not in JPython/Jython, and I'm still making the assumption that CPython and JPython do not interoperate? I think the answer hasn't been made yet, which is why I'm still asking questions. ----- Original Message ----- From: John Mudd <joh...@ya...> To: Uncle Roastie <ro...@ro...> Sent: Sunday, April 22, 2001 12:08 PM Subject: Re: [Jython-users] Jython/Thinking in Patterns Question > I seem to be able to access glob. You can't? Maybe I installed the > python 1.5.2 libs. > > $ jython > Jython 2.1a1 on java1.2.2-RC2 (JIT: javacomp) > Type "copyright", "credits" or "license" for more information. > >>> import glob > >>> dir(glob) > ['__all__', '__doc__', '__file__', '__name__', 'fnmatch', 'glob', > 'glob1', 'has_magic', 'magic_check', 'os', 're'] > >>> > > --- Uncle Roastie <ro...@ro...> wrote: > > Bruce, > > > > "Thinking in Patterns", chapter 9 on the Jython interpreter, > > has been invaluable to me at work. > > > > Question: On pages 9.21 and 9.23 you show how > > to use "glob()" in Jython, and then you add that it > > is not part of the standard Jython package. > > > > So, where can we find this beast? > > And any other similar furry creatures that might exist. > > > > Thanks, > > > > Ron > > > > ron...@ne... (W) > > ro...@ro... (H) > > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > |
From: brian z. <bz...@zi...> - 2001-04-22 17:13:59
|
Ron, glob() is available in the glob module which comes with the standard CPython distribution. If you have CPython available, just add the \Lib directory to your python.path registry value. I don't know if it's possible to get just the CPython libraries or not, but it doesn't hurt to have both Python implementations available. brian -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Uncle Roastie Sent: Saturday, April 21, 2001 11:12 PM To: br...@ec... Cc: jyt...@li... Subject: [Jython-users] Jython/Thinking in Patterns Question Bruce, "Thinking in Patterns", chapter 9 on the Jython interpreter, has been invaluable to me at work. Question: On pages 9.21 and 9.23 you show how to use "glob()" in Jython, and then you add that it is not part of the standard Jython package. So, where can we find this beast? And any other similar furry creatures that might exist. Thanks, Ron ron...@ne... (W) ro...@ro... (H) |
From: Uncle R. <ro...@ro...> - 2001-04-22 03:53:47
|
Bruce, "Thinking in Patterns", chapter 9 on the Jython interpreter, has been invaluable to me at work. Question: On pages 9.21 and 9.23 you show how to use "glob()" in Jython, and then you add that it is not part of the standard Jython package. So, where can we find this beast? And any other similar furry creatures that might exist. Thanks, Ron ron...@ne... (W) ro...@ro... (H) =20 |
From: brian z. <bz...@zi...> - 2001-04-21 14:14:49
|
Scott, Here's an example of what I think you are looking for (it works equally well on a [Java|Python] [class|instance]: >>> class Test: ... def go(self): ... print "invoked go" ... def went(self): ... print "invoked went" ... >>> t = Test() >>> dir(t.__class__) ['__doc__', '__module__', 'go', 'went'] >>> for a in dir(t.__class__): ... if a[0:2] <> "__": ... getattr(t, a)() ... invoked go invoked went >>> Notice the line: getattr(t, a)() The built-in 'getattr' retuns a method bound on the instance t, similar to a Method object in Java. In Java, to execute the Method, you would call: m.invoke(instance, params) in Python you use the callable nature of objects and invoke it by: m(params) since the method is already bound to the instance you don't need to pass it as a param as you do in Java since in Java the Method is always bound to the class, not an instance. For a more indepth look at when the method is bound to an instance and when to a class: >>> getattr(Test, "go") <unbound method Test.go> >>> getattr(t, "go") <method Test.go of Test instance at 3335245> >>> getattr(Test, "go")(t) invoked go >>> getattr(t, "go")() invoked go >>> Notice that when I get the method from the class, I need to pass an instance to invoke it, fulfilling the contract for sending a 'self' argument. Also note that neither go() or went() required arguments in my example. If you really want to blindly invoke methods you'll need to figure out if they require arguments. In general, the invoker knows the arguments required, such as the callback in os.path.walk(). You might want to check out this as well: http://www.diveintopython.org/apihelper_getattr.html hope this helps, brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...]On Behalf Of Scott > Knight > Sent: Saturday, April 21, 2001 7:52 AM > To: jython > Subject: [Jython-users] Running auto-discovered methods > > > A few days ago, Neil Benn queried "Self Describing Scripts in Jython" > and appears to be wanting to do something similar to what I need: > something analogous to Java's Reflection. I can easily get a list of > the method names in a class. I can't figure out how to invoke the > method given it's name in string form. What I am really after is to > cycle through all of the method names in the list and run them all, > rather than type up a method that calls each of a couple hundred methods > statically. > -- > Scott Knight mailto:sc...@sc... > http://www.scottknight.com/ > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > http://lists.sourceforge.net/lists/listinfo/jython-users |
From: Scott K. <sc...@sc...> - 2001-04-21 12:50:21
|
A few days ago, Neil Benn queried "Self Describing Scripts in Jython" and appears to be wanting to do something similar to what I need: something analogous to Java's Reflection. I can easily get a list of the method names in a class. I can't figure out how to invoke the method given it's name in string form. What I am really after is to cycle through all of the method names in the list and run them all, rather than type up a method that calls each of a couple hundred methods statically. -- Scott Knight mailto:sc...@sc... http://www.scottknight.com/ |
From: Ype K. <yk...@xs...> - 2001-04-21 09:47:29
|
Adam, you wrote: >Hello, > I'm new to jython, and I have a rather ornate >question about its capabilities, that I have not been >able to determine the answer to by reading docs. I am >looking to supplement my program with a >very-high-level language to aid development in a >certain region. Ideally, the language would be able to >satisfy the following characteristics > >1) Extend java classes (note that these classes will >be leaves in my inheritence tree; java does not need >to be able to extend my jython classes) Make sure your java classes are on the class path when invoking Jython. Then use the following Jython code: import yourpackage someobj = yourpackage.yourclass() class subclass(yourpackage.yourclass): pass etc. >2) Run in interpretted mode, reading from a text file >(that is, without compilation) > >3) Have the same class compile 'dynamically' down to >java bytecode (note that this can take several >seconds, it must merely be possible) You get both in one go. When a jython module is loaded an internal java class is (quite quickly) built to represent the module. This class is also saved for further use. The Jython function execfile() does all of this, you can also do it directly from your own Java code. >4) Reload compiled classes if they are redefined You can drop modules from sys.modules and reimport them. This might leave the old java classes in memory, though. For serious stuff have a look at: http://jython.sourceforge.net/docs/jreload.html You'll need Java 1.2 for best reloading. In any case you will have to detect the need for reloading yourself (the linecache module is a nice example). >How much of this is possible with Jython as it >currently stands? How much of this is possible within >the Jython framework, in an ideal world (that is, if I >was to look at implementing it myself)? Are there >other languages I should be looking at? Apart from reloading: 100%. Reloading takes some involvement, but you probably can get a satisfactory result. Other languages: there are other scripting languages in Java, but I have no experience with them. In case you need references let me know. >I thank you in advance, My pleasure. Ype Kingma |
From: Adam B. <sir...@ya...> - 2001-04-21 04:21:56
|
Hello, I'm new to jython, and I have a rather ornate question about its capabilities, that I have not been able to determine the answer to by reading docs. I am looking to supplement my program with a very-high-level language to aid development in a certain region. Ideally, the language would be able to satisfy the following characteristics 1) Extend java classes (note that these classes will be leaves in my inheritence tree; java does not need to be able to extend my jython classes) 2) Run in interpretted mode, reading from a text file (that is, without compilation) 3) Have the same class compile 'dynamically' down to java bytecode (note that this can take several seconds, it must merely be possible) 4) Reload compiled classes if they are redefined How much of this is possible with Jython as it currently stands? How much of this is possible within the Jython framework, in an ideal world (that is, if I was to look at implementing it myself)? Are there other languages I should be looking at? I thank you in advance, Adam Berger __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ |
From: Neil B. <nei...@ca...> - 2001-04-17 10:11:52
|
Hello, I tried using the inspect module provided with Python in Jython but it didn't work (I guess cos it uses the C code in the Python engine?). I'm trying to get self describing scripts (in terms of their functions and arguments) using Jython language to return these. I probably could look at the byte code generated with Jython from my Java app. but this seems messy and would break cross scripting language compatibility (i.e. other languages don't produce java bytecode! e.g. VBScript). So, the question is - does anyone know of a Jython module which has the same functionality (well - only the give me methods and arguments functions) using Jython. (I thought of using Java reflection inside Jython which may be OK but I'd need more info on what makes up the java byte code from Jython scripts - could be scary!!). Does anyone have any ideas or suggestions - any/all help greatly appreciated. Cheers, Neil Benn Automation Informatics Scientist Cambridge Antibody Technology |
From: Brian Z. <bri...@ya...> - 2001-04-16 04:04:39
|
With the error message: try path C:\Download\ exception in called method net.sourceforge.liftoff.installer.Install2.main java.lang.NullPointerException at java.util.Hashtable.put(Compiled Code) at net.sourceforge.liftoff.installer.Info.setProperty(Compiled Code) at net.sourceforge.liftoff.installer.Info.loadInstallerProps(Info.java:3 17) at net.sourceforge.liftoff.installer.Install2.<init>(Compiled Code) at net.sourceforge.liftoff.installer.Install2.main(Install2.java:130) at jython-21a1.main(Install.java:376) java.lang.reflect.InvocationTargetException I was testing using Sun JRE 1.1.8_005 and JRE 1.1.7B. I also verified that the installer works ok with MS JView 5.00.3802 (I believe equivalent to JRE 1.1.4) and Sun JRE 1.3.0_02. |
From: <bc...@wo...> - 2001-04-14 07:34:53
|
[me] >If you don't need this scanning, you can manually tell jython which java >packages you have: > > sys.add_package("my.javapackage.core") > sys.add_package("my.javapackage.util") [D-Man] >I assume this will work after the sys-package-manager says "ignoring >corrupt jar file"? Before I was getting "No module 'my' found" (using >your package name above). Yes. You can also get rid of the "skipping bad jar" warning by setting the "python.verbose" property to "error" on the command line: jython -Dpython.verbose=error main.py or in the registry file. regards, finn |
From: D-Man <ds...@ri...> - 2001-04-14 02:35:41
|
On Fri, Apr 13, 2001 at 10:06:57PM +0000, Finn Bock wrote: | [D-Man] | | Just to clear up possible confusion: Jython doesn't load anything from | jars on CLASSPATH. Instead it uses the java mechanism for loading | classes and resources from such jars. Jython only scans the jars to | detect java packages (and support import *). Ok. I was refering to the "sys-package-manager" messages that appear on startup. | If you don't need this scanning, you can manually tell jython which java | packages you have: | | sys.add_package("my.javapackage.core") | sys.add_package("my.javapackage.util") I assume this will work after the sys-package-manager says "ignoring corrupt jar file"? Before I was getting "No module 'my' found" (using your package name above). | >Is there a way to turn off jython's processing and caching of the | >jar's information so I can use this modified (err, hacked <wink>) jar? | >If not, I can write some Java code to run through some tests. | | Have you checked if the JVM will load classes from such a corrupt jar? I | wouldn't be too surprised if some JVMs will ignore a corrupt jar. I suppose some might. I've been using it with JDK 1.1.8 on a Windows box. I also tested it a while ago on a Solaris 8 system. I haven't heard any complaints yet about it totally hosing the system with other VMs. Officially we only support JDK 1.1.8 because a third-party library we use only officially supports JDK 1.1.8. We do know that the product works with JDK 1.2.2 because several customers have reported using it. | I can't think of a way to achieve your goal without resorting to a file. Ok, thanks for the help. -D |
From: <bc...@wo...> - 2001-04-13 22:09:47
|
[D-Man] >I want to use jython to interactively test some Java work I did. >Unfortunately for this situation, jython caches all jar information >and skips any jar that is corrupt. My Java work consists of storing >some information (license key) in a jar in the CLASSPATH. Of course, >doing this (in the only way I could come up with) causes that >particular file to be "corrupt" because it no longer matches the CRC >checksum or the compression algorithm. This is acceptable because >this file is never loaded by the JVM, but read directly by my code. > >When I want to test it with Jython, jython doesn't load the jar >because it is "bad". As a result I don't get any of the classes that >are defined in the jar. Just to clear up possible confusion: Jython doesn't load anything from jars on CLASSPATH. Instead it uses the java mechanism for loading classes and resources from such jars. Jython only scans the jars to detect java packages (and support import *). If you don't need this scanning, you can manually tell jython which java packages you have: sys.add_package("my.javapackage.core") sys.add_package("my.javapackage.util") >Is there a way to turn off jython's processing and caching of the >jar's information so I can use this modified (err, hacked <wink>) jar? >If not, I can write some Java code to run through some tests. Have you checked if the JVM will load classes from such a corrupt jar? I wouldn't be too surprised if some JVMs will ignore a corrupt jar. I can't think of a way to achieve your goal without resorting to a file. regards, finn |