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: Niko S. <ni...@na...> - 2002-03-15 09:36:50
|
Ashish, > How about developing a custom tag for web apps. One that takes > jython scriplet in its body. The request, response, session etc > would be available as explicit objects. The tag could embed a > jython interpreter and execute the given code. How I wish jsp > were jython server pages! very interesting you are mentioning this idea, i was thinking in the same lines just a few days ago (and didn't come back). But through your posting i just tried it out today: and it turns out that it is possible :) (even if it is a bit more extra effort): creating just a straight forward jython class inherited from javax.servlet.jsp.tagext.TagSupport gave me a strange error message: "AttributeError: write-only attr: pageContext". Also with setting python.security.respectJavaAccessibility to false didn't help, so i had to write a Java class (derived from TagSupport) which provides an accessor method to pageContext. The Jython Custom Tag implementation has then to use this to get access to the PageContext object. ---- DemoTag.py ---- from java.io import IOException from javax.servlet.jsp import JspTagException from niko.test import JythonTagSupport class DemoTag(JythonTagSupport): def doStartTag(self): try: out = self.pageContext.getOut() out.print("Hello World from Jython Tag.") except IOException, e: raise JspTagException("Input/output error: %s" % e.toString()) # since this is an empty tag return self.SKIP_BODY ---- JythonTagSupport ---- package niko.test; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; public class JythonTagSupport extends TagSupport { public JythonTagSupport() { super(); } public PageContext getPageContext() { return pageContext; } } ----- Then the only two remaining steps are to define the new jython tag in your tag library descriptor file (TLD) and make sure that jython.jar is available to the classloader of your servlet container. Happy jython-custom-tag-developing :-) Niko |
From: Niko S. <ni...@na...> - 2002-03-15 09:32:49
|
Ashish, > How about developing a custom tag for web apps. One that takes > jython scriplet in its body. The request, response, session etc > would be available as explicit objects. The tag could embed a > jython interpreter and execute the given code. How I wish jsp > were jython server pages! very interesting you are mentioning this idea, i was thinking in the same lines just a few days ago (and didn't come back). But through your posting i just tried it out today: and it turns out that it is possible :) (even if it is a bit more extra effort): creating just a straight forward jython class inherited from javax.servlet.jsp.tagext.TagSupport gave me a strange error message: "AttributeError: write-only attr: pageContext". Also with setting python.security.respectJavaAccessibility to false didn't help, so i had to write a Java class (derived from TagSupport) which provides an accessor method to pageContext. The Jython Custom Tag implementation has then to use this to get access to the PageContext object. ---- DemoTag.py ---- from java.io import IOException from javax.servlet.jsp import JspTagException from niko.test import JythonTagSupport class DemoTag(JythonTagSupport): def doStartTag(self): try: out = self.pageContext.getOut() out.print("Hello World from Jython Tag.") except IOException, e: raise JspTagException("Input/output error: %s" % e.toString()) # since this is an empty tag return self.SKIP_BODY ---- JythonTagSupport ---- package niko.test; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; public class JythonTagSupport extends TagSupport { public JythonTagSupport() { super(); } public PageContext getPageContext() { return pageContext; } } ----- Then the only two remaining steps are to define the new jython tag in your tag library descriptor file (TLD) and make sure that jython.jar is available to the classloader of your servlet container. Happy jython-custom-tag-developing :-) Niko |
From: Niko S. <ni...@na...> - 2002-03-15 09:06:21
|
Ashish, > How about developing a custom tag for web apps. One that takes > jython scriplet in its body. The request, response, session etc > would be available as explicit objects. The tag could embed a > jython interpreter and execute the given code. How I wish jsp > were jython server pages! very interesting you are mentioning this idea, i was thinking in the same lines just a few days ago (and didn't come back). But through your posting i just tried it out today: and it turns out that it is possible :) (even if it is a bit more extra effort): creating just a straight forward jython class inherited from javax.servlet.jsp.tagext.TagSupport gave me a strange error message: "AttributeError: write-only attr: pageContext". Also with setting python.security.respectJavaAccessibility to false didn't help, so i had to write a Java class (derived from TagSupport) which provides an accessor method to pageContext. The Jython Custom Tag implementation has then to use this to get access to the PageContext object. ---- DemoTag.py ---- from java.io import IOException from javax.servlet.jsp import JspTagException from niko.test import JythonTagSupport class DemoTag(JythonTagSupport): def doStartTag(self): try: out = self.pageContext.getOut() out.print("Hello World from Jython Tag.") except IOException, e: raise JspTagException("Input/output error: %s" % e.toString()) # since this is an empty tag return self.SKIP_BODY ---- JythonTagSupport ---- package niko.test; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; public class JythonTagSupport extends TagSupport { public JythonTagSupport() { super(); } public PageContext getPageContext() { return pageContext; } } ----- Then the only two remaining steps are to define the new jython tag in your tag library descriptor file (TLD) and make sure that jython.jar is available to the classloader of your servlet container. Happy jython-custom-tag-developing :-) Niko |
From: BillWorker 2. <bil...@in...> - 2002-03-15 08:15:54
|
Let me explain myself! In Java if I were to extend AbstractListModel and use an array internalArray to hold my data internally, then for getElementAt() I could do internalArray[i]. The object that I get from the array does not need to be converted to java.lang.Object as it ALWAYS inherits from java.lang.Object However, in Jython I have to either i. ensure that the object that I get from the array (list) is an instance of java.lang.Object or ii. wrap the Python object into a wrapper class that inherits from java.lang.Object This is not obivous to a new Jython programmer who has come from Java! Ashish |
From: BillWorker 2. <bil...@in...> - 2002-03-15 06:00:38
|
Just wondering if it is a good idea! How about developing a custom tag for web apps. One that takes jython scriplet in its body. The request, response, session etc would be available as explicit objects. The tag could embed a jython interpreter and execute the given code. How I wish jsp were jython server pages! Ashish |
From: Brad C. <bk...@mu...> - 2002-03-15 03:09:03
|
Next week I need to give a one hour presentation at Novell's Brainshare titled: "Rapid Application Development with Jython". I'll be demo'ing Jedit, JythonInterpreter (plugin), JinSitu and of course Jython, on Win32 and NetWare Systems. I have a simple Beans based application that I'll be showing, but I'm looking for some other things: 1. Quick intro to the Python Language (10 minutes) 2. Perhaps a Power Point slide show for item 1 3. Quick examples that I can type interactively that demonstrate the power of the interpreted, typeless nature of Jython. I'm aware of what's available at python.org and jython.org, but if you have any other recommendations I'd appreciate it. My audience will be in-experienced VB'ers/Perlers.. And experienced Java developers. Thanks for any suggestions, Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements |
From: Brad C. <bk...@mu...> - 2002-03-15 01:29:28
|
Sorry, false alarm. It was a NetWare thing. I needed to tell java to create a console for I/O. java -ns ... Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements |
From: Brad C. <bk...@mu...> - 2002-03-15 00:48:38
|
Nothing like waiting to the last minute.. I have to demo Jython at Novell's Brainshare next week. Working well on Win32, and if I pass command line args on NetWare .. it seems to work (for swing apps) But if I want to run it interactively, I get >>> Traceback (no code object) at line 0 IOError: Wrong kind of object -- Could be from a number of causes, anyone know which is most likely? 1. reading from stdin returned EOF right away? I'm not sure if stdin is working 2. When I installed it, I used the graphical install and specified OS = Macintosh. Hey, it installed! But, is there perhaps an os. specific class that is being used for interactive I/O and it's making mac specific calls? Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements |
From: <don...@kc...> - 2002-03-14 23:58:06
|
I will be out of the office starting 03/14/2002 and will not return until 03/18/2002. |
From: Oti <oh...@ya...> - 2002-03-14 16:21:11
|
Hello, is somebody going to JavaOne ? Oti. __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ |
From: Sandy N. <san...@ho...> - 2002-03-14 13:43:54
|
Hi folks, I work with a web company that has about 180,000 registered users, and pretty good weekly traffic stats. Their current platform of development includes Oracle for the data server, AOLServer for web serving platform and TCL to script the whole thing together, with everything running on Solaris on a few fat multiprocessor Sun machines. I just had a chat with the CTO (I've been trying to get him to look into python for a while) and it seems his resistance has finally broken (-: he spent a real weekend with the python and his initial misgivings about significant whitespace have disapeared, and now he's raving about how well the language 'flows'. Suddenly, this recent convert wants to incorporate python into the next generation build of the web site. Now he is leaning towards using a combination of jython and java to reimplement and refactor the design as he likes the support and momentum behind java and doesn't want to give up the productivity benefits of a scripting language. Now, I'm really happy to have turned the top tech decision-maker in the company on to python (kinda validates my fascination with the language internally :-) But I'm worried about things like performance and scalability: is it wise to service this number of customers with jython servlets running on tomcat for example? Any advice would be much appreciated. Thanks. Sandy <cross-posted to c.l.py> _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: (ÁÖ)¾¾Äß½º <se...@se...> - 2002-03-14 08:45:06
|
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ks_c_5601-1987"> <title>신제품 출시</title> </head> <body> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="540" id="AutoNumber1" height="416"> <tr> <td width="100%" height="94"> <img border="0" src="http://www.seecops.com/mail/18/title1.gif" width="540" height="94"></td> </tr> <tr> <td width="100%" height="34" bgcolor="#4068bd"> <p align="center" style="MARGIN-LEFT: 10px; LINE-HEIGHT: 150%"> <img border="0" src="http://www.seecops.com/mail/18/title2.gif" width="342" height="25"></p></td> </tr> <tr> <td width="100%" height="76" background="http://www.seecops.com/mail/18/body.gif"> <table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="100%" id="AutoNumber2" height="468"> <tr> <td width="100%" colspan="2" height="144"> <p align="left" style="MARGIN-LEFT: 4px; LINE-HEIGHT: 120%"> <font color="#111111" size="2">안녕하십니까? <br> DM Academy의 웹지기 입니다.<br> </font><font face="굴림체" size="2" color="#111111">'봄의 기운이 일어섰다' 는 입춘,'숨어서 겨울잠을 자던 동물들이 놀라서 떠든다' 는 경칩을 모두 지나쳤습니다. 이제는 바람의 숨결조차 향긋하게 느껴집니다. <br> 봄이 오는 즐거움을 알게 해준 겨울이 이제 밉지 만은 않습니다.<br> 길거리 꽃집에라도 들러, 성급하게 피어난 프리지어 한 다발을 사서 봄 마중을 가야겠습니다.<br> 오늘은 봄소식같이 반가운, 신작 소식을 알려드립니다.</font></p></td> </tr> <tr> <td width="50%" height="324"> <p align="center"> <img border="0" src="http://www.seecops.com/mail/18/product1.gif" width="250" height="221"><br> <img border="0" src="http://www.seecops.com/mail/18/product1_.gif" width="214" height="77"><br> <a href="http://203.251.130.4/downdemo/today/English365.exe"> <img border="0" src="http://www.seecops.com/mail/18/down.gif" width="132" height="26"></a><a target="_blank" href="http://203.251.130.4/today.htm"><img border="0" src="http://www.seecops.com/mail/18/buy.gif" width="114" height="26"></a></p></td> <td width="50%" height="324"> <p align="center"> <img border="0" src="http://www.seecops.com/mail/18/product2.gif" width="250" height="221"><br> <img border="0" src="http://www.seecops.com/mail/18/product2_.gif" width="214" height="77"><br> <a href="http://203.251.130.4/downdemo/round/Proverbs.exe"> <img border="0" src="http://www.seecops.com/mail/18/down.gif" width="132" height="26"></a><a target="_blank" href="http://203.251.130.4/round.htm"><img border="0" src="http://www.seecops.com/mail/18/buy.gif" width="114" height="26"></a></p></td> </tr> </table> </td> </tr> <tr> <td width="100%" height="44" background="http://www.seecops.com/mail/18/body.gif"> <p align="center"> <img border="0" src="http://www.seecops.com/mail/18/line.gif" width="504" height="28"></p></td> </tr> <tr> <td width="100%" height="76" background="http://www.seecops.com/mail/18/body.gif"> <p align="center"> <img border="0" src="http://www.seecops.com/mail/18/atitle.gif" width="491" height="67"></p></td> </tr> <tr> <td width="100%" height="76" background="http://www.seecops.com/mail/18/body.gif"> <table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" bordercolor="#111111" width="116%" id="AutoNumber3" height="308"> <tr> <td width="51%" height="208"> <img border="0" src="http://www.seecops.com/mail/18/audio1.gif" align="right" width="308" height="201"></td> <td width="67%" height="208"> <img border="0" src="http://www.seecops.com/mail/18/audio2.gif" width="189" height="199"></td> </tr> <tr> <td width="100%" colspan="2" height="100"> <p align="left"> <img border="0" src="http://www.seecops.com/mail/18/event.gif" width="435" height="91"></p></td> </tr> </table> </td> </tr> <tr> <td width="100%" height="16"> <img border="0" src="http://www.seecops.com/mail/18/downtitle.gif" width="540" height="29"></td> </tr> </table> </center> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0" style="BORDER-COLLAPSE: collapse" width="576" id="AutoNumber7" bgcolor="#ccccff"> <tr> <td width="574"> <p style="LINE-HEIGHT: 150%"><font color="#111111"> <FONT size=2>jyt...@li...님</FONT><font style="FONT-SIZE: 9pt">귀하의 승락없이 홍보성 전자 우편을 보내게 된 점 정중히 사과 드립니다.<br> 정보통신망이용촉진법 규정을 준수하여 </font><font color="#ff0000"> <span style="FONT-SIZE: 9pt">광고</span></font><span style="FONT-SIZE: 9pt">메일임을 표시하였으며, 수신거부 장치를 마련하고 <br> 있습니다. 귀하의 전자 우편 주소는 인터넷 상의 공개된 장소에서 습득하였으며, 저희는 귀하의<br> 전자우편 주소 외 어떠한 개인정보도 가지고 있지 않으므로 안심하시기 바랍니다. 수신을 원치<br> 않으시면 <font color="#ff0000">수신거부</font>를 클릭해 주십시요</span></font></p></td> </tr> </table> </center> </div> <P align=center><center><a href='http://203.251.130.47:9080/refuse/refuse?cmd=view&group=34&name=&mail=jyt...@li...'><img src='http://203.251.130.47:9080/refuse/mail-refuse.gif' border=0)></center></P> </body> </html> |
From: Paul G. <pau...@so...> - 2002-03-14 08:32:58
|
Here is a variation on the method described below. It assumes that you have the python code that defines your methods stored in a Sting. This allows you to retrieve the function definitions from a database, resource, hardcoded string, etc. static final String code = "def helloWorld():\n print 'Hello World\n'"; // example using a hardcoded string .... interp_ = new InteractiveConsole(); code = code.trim(); StringTokenizer st = new StringTokenizer (code, System.getProperty("line.separator")); while (st.hasMoreTokens()) { String lineOfCode = st.nextToken(); interp_.push(lineOfCode); } .... -Paul >>- I would also like to expose some python functions into the global >>namespace of any executed python script. These functions are actually >>implemented in Java and provide some app-specific functionality to the >>python environment. >> > >I'm not one of the 'experts', but this is how I do it and it seems to work= > fine; just 'execfile' the file with the functions: > > InputStream functionFileStream =3D FileIO.FindFileOrStream(= > functionListName, dataPath, "functions", debugLevel); > python.execfile( functionFileStream, functionListName); // pass the name= > for parsing errors > >This way the names are scoped into the top level. > >(My 'FindFileOrStream' finds the function file in a file or jar in the= > 'dataPath'. I have a list of functions files in an XML configuration= > file.) > >- Jim > > -- Paul Giotta Software Architect Technoparkstrasse 1, CH-8005 Zurich. Email: pau...@So... Home Page WWW: http://www.softwired-inc.com *Next stop UBIQUITY!* Office: +41 1 4452370 | Fax: +41 1 4452372 | Mobile: +41 76 389 1180 *** Go Mobile: Out NOW: iBus//Mobile 2.1 *** ***iBus//MessageServer 4.5 with XA extensions*** |
From: TigerWraith <tig...@ks...> - 2002-03-14 06:03:35
|
Also I just saw how I typed that, im not trying to be rude. Just trying to reclaim my computer back from what my GF did to it today. And she wonders why she's locked out of it. Sorry if it seems im being rude. TigerWraith |
From: TigerWraith <tig...@ks...> - 2002-03-14 05:51:46
|
And just where im I typing this script at? |
From: chuck c. <cc...@zi...> - 2002-03-14 05:06:37
|
If you write a simple jython script and play with jythonc a little bit I think you'll come to understand the various options pretty quickly. I started using jythonc today for the first time and with a little experiementation I had it doing everything I wanted. To start with create a simple jython script. jythonc MyPy.py This will create a java file in the jpywork directory and will also compi= le it to a class file. This will just process the module that you pass in. jythonc -c MyPy.py This becomes helpful if you write jython that makes use of the .py module= s found in the Lib directory of your jython install. For instance, if you import and use the cPickle module you'll notice that when jythonc says it= is creating a .java file you'll see MyPy module as well as copy_reg module. This is because cPickle imports copy_reg. So in this way you can build everything in the core library to java so you won't need the have your python.home variable set and have all of thos files in Lib. jython -c -j MyJar.jar MyPy.py This will compile all the files you need into one nice and tidy jar file = and you can then execute your code using java -jar MyJar.jar if you are importing lots of java files you have written in com.company.project.subsystem.* then you can add these pacakages using the -A option. You can include multiple packages using a comma separated list. Try it out. I'm sure just these couple of commands will get you pretty f= ar. One minor cosmetic bug in jythonc.... If you type jythonc the Usage message was never updated during the migrat= ion from jpython -- it still says jpythonc chuck ----- Original Message ----- From: "TigerWraith" <tig...@ks...> To: <jyt...@li...> Sent: Wednesday, March 13, 2002 10:16 PM Subject: RE: [Jython-users] Help please! > Ok I'm using win2K Pro how in do I get it to compile can anyone please tell > me how. The examples aren't very good references for me. > > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...]On Behalf Of Gerhard > H=E4ring > Sent: Wednesday, March 13, 2002 8:01 PM > To: jyt...@li... > Subject: Re: [Jython-users] Help please! > > > Le 13/03/02 ? 20:47, TigerWraith =E9crivit: > > Can jython compile python files into class files for java? > > Sure. jythonc does this. > > Gerhard > -- > mail: gerhard <at> bigfoot <dot> de registered Linux user #6423= 9 > web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB4= 3C0 > public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 4= 3C0 > reduce(lambda x,y:x+y,map(lambda > x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: TigerWraith <tig...@ks...> - 2002-03-14 04:19:59
|
Ok I'm using win2K Pro how in do I get it to compile can anyone please tell me how. The examples aren't very good references for me. -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Gerhard Häring Sent: Wednesday, March 13, 2002 8:01 PM To: jyt...@li... Subject: Re: [Jython-users] Help please! Le 13/03/02 ? 20:47, TigerWraith écrivit: > Can jython compile python files into class files for java? Sure. jythonc does this. Gerhard -- mail: gerhard <at> bigfoot <dot> de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Gerhard <gh_...@gm...> - 2002-03-14 03:13:18
|
Le 13/03/02 ? 20:47, TigerWraith écrivit: > Can jython compile python files into class files for java? Sure. jythonc does this. Gerhard -- mail: gerhard <at> bigfoot <dot> de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b'))) |
From: TigerWraith <tig...@ks...> - 2002-03-14 02:51:23
|
Can jython compile python files into class files for java? |
From: Ype K. <yk...@xs...> - 2002-03-13 19:00:45
|
Josh, >Hello all, > I'm working to embed jython within an in-house distributed java >application. I'm really looking to solve two major problems and haven't >come to any answers from looking over the javadoc or the source code. > >- I need a hook into the import functionality of the interpreter. We store >scripts in JAR files that are 'hot-pluggable' into a running system, so when >interpreting a python script that imports another module, I would like to be >able to handle such an event so that I may look through these >'hot-pluggable' JAR files instead of relying on the sys.path or PYTHONPATH >variables. Have a look at imp.java in the org/python/core directory. At the end is the java class you need to replace/enhance. It's possible to do that from both jython code and java code by hooking the built in. Iirc there is work going on on importing from jars. You might ask on jython-dev. <rest already answered> Have fun, Ype -- |
From: Jim A. <ji...@tr...> - 2002-03-13 16:43:02
|
On 3/13/2002 at 11:27 AM Seabloom, Josh wrote: >- I would also like to expose some python functions into the global >namespace of any executed python script. These functions are actually >implemented in Java and provide some app-specific functionality to the >python environment. I'm not one of the 'experts', but this is how I do it and it seems to work= fine; just 'execfile' the file with the functions: InputStream functionFileStream =3D FileIO.FindFileOrStream(= functionListName, dataPath, "functions", debugLevel); python.execfile( functionFileStream, functionListName); // pass the name= for parsing errors This way the names are scoped into the top level. (My 'FindFileOrStream' finds the function file in a file or jar in the= 'dataPath'. I have a list of functions files in an XML configuration= file.) - Jim |
From: Seabloom, J. <jo...@ai...> - 2002-03-13 16:27:19
|
Hello all, I'm working to embed jython within an in-house distributed java application. I'm really looking to solve two major problems and haven't come to any answers from looking over the javadoc or the source code. - I need a hook into the import functionality of the interpreter. We store scripts in JAR files that are 'hot-pluggable' into a running system, so when interpreting a python script that imports another module, I would like to be able to handle such an event so that I may look through these 'hot-pluggable' JAR files instead of relying on the sys.path or PYTHONPATH variables. - I would also like to expose some python functions into the global namespace of any executed python script. These functions are actually implemented in Java and provide some app-specific functionality to the python environment. The only way I've been able to accomplish this so far is to write a Java class to implement the functions via methods, and then insert the Java class as PyJavaInstance in the globals dictionary passed into the PythonInterpreter constructor. This has the side effect of requiring syntax of the nature : THE_APP.functionName() Where 'THE_APP' is the name I used to register the object in the globals dictionary. Where I would prefer syntax like: functionName() That is it. I've solved these problems with Rhino and JavaScript, but the javadoc provided with the rhino interpreter is much more complete than the Jython javadoc. Thank you to everyone ahead of time for you help. Josh Seabloom Applied Innovation |
From: Oti <oh...@ya...> - 2002-03-13 15:10:46
|
[ Samuele Pedroni ] > From: Oti <oh...@ya...> > > Hello, > > > > I just stumbled over the following behaviour of string.replace(). > > Is it true I cannot pass a java.lang.String as first argument: > > > > [appl|pwe] > jython > > Jython 2.1 on java1.3.0 (JIT: null) > > Type "copyright", "credits" or "license" for more information. > > >>> import string > > >>> from java.lang import String > > >>> old = String( "old" ) > > >>> string.replace( old, "l", "d" ) > > Traceback (innermost last): > > File "<console>", line 1, in ? > > File "e:\jython21\Lib\string.py", line 409, in replace > > TypeError: replace(): expected 2 args; got 3 > > >>> string.replace( old.intern(), "l", "d" ) > > 'odd' > > > > > > Yes, the odd behavior is expected. > > You should consider that string.py is coded > assuming Python string input, and simply > using the Python string object methods. > > so string.replace(s,old,new,maxsplit) > > simply calls s.replace(old,new,maxsplit) > > now perchance Java strings have a replace method > which takes only 2 arguments. > > The other thing to consider > is that Java constructors > called from Jython do not convert the result, its > Java instance nature is preserved. > OTOH normal Java methods have their > results always converted following the usual > rules (eg. java.lang.String -> string): > > >>> from java.lang import String > >>> s=String("java") > >>> s.__class__ > <jclass java.lang.String at 8070355> > >>> type(s) > <jclass org.python.core.PyJavaInstance at 6040101> > >>> s2=s.toString() > >>> type(s) == type('') > 0 > >>> type(s2) == type('') > 1 > > The following also fails: > >>> s+'__' > Traceback (innermost last): > File "<console>", line 1, in ? > TypeError: __add__ nor __radd__ defined for these operands > > I don't know if we should change all this. No, I think you shouldn't. Thank you very much for your explanation. As you might havae guessed, I am (still) struggling to upgrade from good old JPython1.0.3, where the example above ran. I hope these are rare cases. Best wishes, Oti. __________________________________________________ Do You Yahoo!? Try FREE Yahoo! Mail - the world's greatest free email! http://mail.yahoo.com/ |
From: chuck c. <cc...@zi...> - 2002-03-13 02:36:20
|
thanks brian... on one front it was really simple...i tried import pickle and got an ImportError and I moved on to writing my own serialization not even thinking to try importing cPickle i've switched to using the cPickle code now and everything works as expected it looks like samuel has tracked down the bug...so all ends well thanks chuck ----- Original Message ----- From: "brian zimmer" <bz...@zi...> To: <cc...@zi...>; <jyt...@li...> Cc: <bu...@cu...> Sent: Tuesday, March 12, 2002 7:50 PM Subject: [Jython-users] RE: Issue with None and Serialization > Chuck, > > Why can't you assume cPickle is available? It's standard in the Jython > dist as a Java-implemented module. I have modified your example a bit > to use it and it seems to behave properly. Add the following two > methods: > > --- code --- > > import cPickle > > def load_with_pickle(path): > fp = open(path, "rb") > try: > data = cPickle.load(fp) > finally: > fp.close() > return data > > def save_with_pickle(obj, path): > fp = open(path, "wb") > try: > cPickle.dump(obj, fp) > finally: > fp.close() > |
From: Samuele P. <pe...@in...> - 2002-03-13 02:16:34
|
From: chuck clark <cc...@zi...> > I thought the problem might be that between serializing/deserializing I > might somehow be getting a different instance of PyNone but this isn't > the case as evidenced below when I inspect the objects in the > interpreter after running th code above > >>> type(a.attr) > <jclass org.python.core.PyNone at 334527779> > >>> type(b.attr) > <jclass org.python.core.PyNone at 334527779> > No, you're right it is a *bug* and your hypothesis is right, only the above give you the "address" of the PyNone class. The following is more revealing: >>> execfile("test.py") Testing initial object... attr is None: 1 attr type is: org.python.core.PyNone attr == None: 1 Testing deserialized object... attr is None: 0 attr type is: org.python.core.PyNone attr == None: 0 >>> id(None) 6503157 >>> id(a.attr) 6503157 >>> id(b.attr) 8302342 It is a problem with singletons serialization, it has gone unnoticed until your report, it affects None, Ellipsis etc Thanks, Samuele Pedroni. |