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: Brad C. <bc...@vi...> - 2002-03-26 19:31:27
|
As the one that asked Anythony about this (mis?)feature on the jpublish list, I'd like to add my support to his request. I'd have done it directly except that I'm so new to python that I'd thought this was my fault. PS: The token (+ vs , vs nothing) isn't important. What *is* is that the result winds up as a string, not array, tuple, etc. PPS: Probably harder, supporting expansion of variables within strings ala' perl would immediately make python a favorite. The ${variable}s workaround that was offered here earlier is a bit obscure for heavily used stuff like expanding variable information into html template files. See http://virtualschool.edu/jwaa under Mls (multi line preprocessor), velocity, or JSP/ASP for workarounds to the same problem in Java. This really "should" be supported by the language, not outside as in mls, velocity, or jsp. Like this: title = "my title" print ''' <html> <head> <title>$title</title> </head> </html> ''' Ideally, this should work for any expression (variables, subroutine calls, arrays, tuples, etc). As I recall, perl didn't do all of these right. Don't recall exactly; I haven't used perl in some years. At 1:23 PM -0500 3/26/02, Anthony Eden wrote: >Currently, in Jython, using any arbitrary Java object aside from a >java.lang.String, the following fails: > > print "text" + obj > >With the message: TypeError: __add__ nor __radd__ defined for these operands > >But the following works: > > print "test", obj > >Would the Jython implementers consider modifying the PyJavaInstance >class with something similar to: > > public PyObject __add__(PyObject object) { > return __str__ + object.__str__(); > } > >So that the + notation as used in Java works properly? I am not >sure if the code I provided above is correct as I am >not intimately familiar with the Jython source. I am also not sure >if this has been discussed before: the mailing list >archives provided at the Jython.org site do not have search >facilities (AFAICT) and I was unable to find anything about >it in my mail application (back to 7/21/2001), so I apologize ahead >of time if it has. > >Sincerely, >Anthony Eden > > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >https://lists.sourceforge.net/lists/listinfo/jython-users -- Brad Cox, PhD; bc...@vi... 703 361 4751 o For industrial age goods there were checks and credit cards. For everything else there is http://virtualschool.edu/mybank o Java Interactive Learning Environment http://virtualschool.edu/jile o Java Web Application Architecture: http://virtualschool.edu/jwaa |
From: Anthony E. <ae...@si...> - 2002-03-26 19:24:55
|
No need to be sorry. Thanks to all who have answered this to clear this up and for demonstrating the proper way to handle String concatenation in Jython. Perhaps this should be added to the FAQ. ;-) For Java programmers getting into Python via Jython, the behavior is not evident. Sincerely, Anthony Eden > -----Original Message----- > From: Samuele Pedroni [mailto:pe...@in...] > Sent: Tuesday, March 26, 2002 2:13 PM > To: kb...@ca...; Anthony Eden > Cc: jyt...@li... > Subject: Re: [Jython-users] Supporting + on Java objects > > > From: Kevin Butler <kb...@ca...> > > > - The proposed enhancement for Java instances would cause Python instances & > java instances to behave differently: > > t = 5 > > s = Object() > > print "text" + t + " " + s ## error > > > > Exactly, that's the point, as long as Jython is an implementation > of Python <wink> , the behavior + and strings will not change, sorry. > > regards. > > |
From: Samuele P. <pe...@in...> - 2002-03-26 19:14:11
|
From: Kevin Butler <kb...@ca...> > - The proposed enhancement for Java instances would cause Python instances & java instances to behave differently: > t = 5 > s = Object() > print "text" + t + " " + s ## error > Exactly, that's the point, as long as Jython is an implementation of Python <wink> , the behavior + and strings will not change, sorry. regards. |
From: brian z. <bz...@zi...> - 2002-03-26 19:06:16
|
Anthony, Try: print "text" + str(obj) for the first one to work. The reason the latter works is because you are not concatenating the values only printing them in order. Python is a strongly typed language and typecasts do not occur automatically for such operations as adding a string to an integer. I do not expect the Jython implementation to change this behaviour. A CPython session exhibits the same: Python 2.2 (#28, Dec 21 2001, 12:21:22) [MSC 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> obj = 1 >>> print "text" + obj Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: cannot concatenate 'str' and 'int' objects >>> If you search the c.l.python newsgroup for 'adding string integer' you'll find a number of references to this issue. hope this helps, brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...] On Behalf > Of Anthony Eden > Sent: Tuesday, March 26, 2002 12:23 PM > To: jyt...@li... > Subject: [Jython-users] Supporting + on Java objects > > > Currently, in Jython, using any arbitrary Java object aside > from a java.lang.String, the following fails: > > print "text" + obj > > With the message: TypeError: __add__ nor __radd__ defined for > these operands > > But the following works: > > print "test", obj > > > Would the Jython implementers consider modifying the > PyJavaInstance class with something similar to: > > public PyObject __add__(PyObject object) { > return __str__ + object.__str__(); > } > > So that the + notation as used in Java works properly? I am > not sure if the code I provided above is correct as I am not > intimately familiar with the Jython source. I am also not > sure if this has been discussed before: the mailing list > archives provided at the Jython.org site do not have search > facilities (AFAICT) and I was unable to find anything about > it in my mail application (back to 7/21/2001), so I apologize > ahead of time if it has. > > Sincerely, > Anthony Eden > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: Kevin B. <kb...@ca...> - 2002-03-26 18:52:20
|
I'd be hesitant to do this. A couple of reasons: - In general, the Python string formatting idioms are preferred: Instead of: print "text " + obj + ", " + obj2 + "/" + obj3 use: print "text %s, %s/%s" % (obj, obj2, obj3) or: print "text %(obj)s, %(obj2)s/%(obj3)s" % vars() - The proposed enhancement for Java instances would cause Python instances & java instances to behave differently: t = 5 s = Object() print "text" + t + " " + s ## error kb Anthony Eden wrote: > Currently, in Jython, using any arbitrary Java object aside from a java.lang.String, the following fails: > > print "text" + obj > > With the message: TypeError: __add__ nor __radd__ defined for these operands > > But the following works: > > print "test", obj > > > Would the Jython implementers consider modifying the PyJavaInstance class with something similar to: > > public PyObject __add__(PyObject object) { > return __str__ + object.__str__(); > } > > So that the + notation as used in Java works properly? I am not sure if the code I provided above is correct as I am > not intimately familiar with the Jython source. I am also not sure if this has been discussed before: the mailing list > archives provided at the Jython.org site do not have search facilities (AFAICT) and I was unable to find anything about > it in my mail application (back to 7/21/2001), so I apologize ahead of time if it has. > > Sincerely, > Anthony Eden > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Anthony E. <ae...@si...> - 2002-03-26 18:23:08
|
Currently, in Jython, using any arbitrary Java object aside from a java.lang.String, the following fails: print "text" + obj With the message: TypeError: __add__ nor __radd__ defined for these operands But the following works: print "test", obj Would the Jython implementers consider modifying the PyJavaInstance class with something similar to: public PyObject __add__(PyObject object) { return __str__ + object.__str__(); } So that the + notation as used in Java works properly? I am not sure if the code I provided above is correct as I am not intimately familiar with the Jython source. I am also not sure if this has been discussed before: the mailing list archives provided at the Jython.org site do not have search facilities (AFAICT) and I was unable to find anything about it in my mail application (back to 7/21/2001), so I apologize ahead of time if it has. Sincerely, Anthony Eden |
From: <Ken...@ub...> - 2002-03-26 17:15:04
|
Just started looking at Zope - are ZPTs synonymous with html pages containing dtml? Was thinking of creating a Zope object model type prototype in servlet/jsp land to investigate the usefulness (I've a friend who swears by Zope). I'd be interested in what you've done.. Did I hear a rumour someplace that efforts are underway to port Zope to Jython? -----Original Message----- From: bkc Sent: 26 March 2002 16:09 To: jython-users Cc: bkc Subject: Re: [Jython-users] JythonServlet over Java Servlet On 26 Mar 2002 at 4:55, Michel Pelletier wrote: > I will be making an alpha release soon of Zope Page Templates for > Jython. For those of you who don't know, ZPTs are like XMLC except > that they are much more "pythonic" and dynamic (the core PT engine > was written by Guido and others at Pythonlabs and ZC). I'm just > chasing down one bug right now and then I'll share; hopefully ZC will > include my patches in their Page Templates so I don't have to maintain > That will be wonderful! Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users Visit our website at http://www.ubswarburg.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. |
From: Brad C. <bk...@mu...> - 2002-03-26 15:53:40
|
On 26 Mar 2002 at 4:55, Michel Pelletier wrote: > I will be making an alpha release soon of Zope Page Templates for > Jython. For those of you who don't know, ZPTs are like XMLC except > that they are much more "pythonic" and dynamic (the core PT engine > was written by Guido and others at Pythonlabs and ZC). I'm just > chasing down one bug right now and then I'll share; hopefully ZC will > include my patches in their Page Templates so I don't have to maintain > That will be wonderful! Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements |
From: Syver E. <syv...@on...> - 2002-03-26 12:30:55
|
Brad Cox <bc...@vi...> writes: > Has anyone here successfully modified bsf.jar to work with jython > instead of jpython? Could you provide a copy? > > The instructions at > > http://www.lonsteins.com/articles/jython-bsf.html > I just went with Robert Bill, he has alrady done this and has the files on his supporting web site for his book about Jython. http://www.digisprings.com/jython/BSF.html If you are serious about jython, get the book. Helped me a lot with avoiding programing by accident with jython by helping me understand the interaction between java and jython. -- Vennlig hilsen Syver Enstad |
From: Michel P. <mi...@di...> - 2002-03-26 10:58:26
|
> 3. With the combination of XMLC, it can achieve even better code/markup > separation than model two JSP (taglib)! Think about it, do you prefer > logic/iteration tags in the markup, or python for loop and list > comprehension? I will be making an alpha release soon of Zope Page Templates for Jython. For those of you who don't know, ZPTs are like XMLC except that they are much more "pythonic" and dynamic (the core PT engine was written by Guido and others at Pythonlabs and ZC). I'm just chasing down one bug right now and then I'll share; hopefully ZC will include my patches in their Page Templates so I don't have to maintain a fork. > optimize the performance critical part in Java. I often wonder why Jython > Servlet hasn't caught on - IMO it's mainly because the developer need to > understand 1) Java 2)Java servlet 3) Python, and realize the advantage of > this combination. A big problem, I think, is that the servlet API is very low level; when Python programmers want something high level where they can just plug simple components into a framework and see those components added to their website. The Servlet API is much to low-level to do that; servlets programmers need to worry about protcol details and other HTTP stuff. Zope is kind of like this for CPython programmers, but it's not very simple. Writing Zope extensions requires quite a bit of knowledge about Zope-only details. Zope tries to abstract the protocol (read "CGI") primarily with a mechanism called "object publishing". An object publisher servlet would be pretty easy to write, and it may even be possible to use the old Zope kernel "bobo" to do the publishing work and just wrap it in a servlet. -Michel |
From: Brad C. <bc...@vi...> - 2002-03-26 03:03:03
|
Has anyone here successfully modified bsf.jar to work with jython instead of jpython? Could you provide a copy? The instructions at http://www.lonsteins.com/articles/jython-bsf.html didn't take for some reason: "py" still not recognized, with jython.jar and the modified bsf.jar in my application's WEB-INF/lib. Might the problem be a class loader conflict with bsf.jar in tomcat's lib? Will check tomorrow. -- Brad Cox, PhD; bc...@vi... 703 361 4751 o For industrial age goods there were checks and credit cards. For everything else there is http://virtualschool.edu/mybank o Java Interactive Learning Environment http://virtualschool.edu/jile o Java Web Application Architecture: http://virtualschool.edu/jwaa |
From: º£½ºÆ®¾Ö´Ï¸Þ <se...@be...> - 2002-03-25 17:58:45
|
<html> <head> <meta http-equiv="content-type" content="text/html; charset=euc-kr"> <title>BA_mail</title> <link rel="stylesheet" type="text/css" href="http://www.bestanime.co.kr/inc/css/test.css"> </head> <body class=mailBody bgcolor="white" text="black" link="blue" vlink="purple" alink="red" leftmargin="10" marginwidth="10" topmargin="10" marginheight="10"> <center> <table cellpadding="0" cellspacing="0" width="609" background="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21batang.gif"> <tr> <td width="609" bgcolor="white"> <table style="border-collapse:collapse;" align="center" cellspacing="0" width="617" bgcolor="#F0EEEE"> <tr> <td width="613" style="border-width:1; border-color:rgb(102,102,102); border-style:solid;"> <p align="left"> 허락없이 광고메일을 보내게 되어 죄송합니다. 본메일은 정보통신망 이용촉진 및 정보 보호 등에 관한<br> 법률 제 50조에 의거한 [광고] 메일입니다. e-mail주소는 인터넷상에서 취득하였으며, 메일주소 외<br> 어떠한 개인 정보도 가지고 있지 않습니다. </p> </td> </tr> </table> </td> </tr> <tr> <td width="609"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21top2.gif" width="620" height="99" border="0" usemap="#ImageMap1"></p> </td> </tr> <tr> <td width="609" height="158"> <p><a href="http://www.bestanime.co.kr" target="_blank"><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21image.gif" width="620" height="132" border="0"></a></p> </td> </tr> <tr> <td width="609" height="6"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_1.gif" width="620" height="30" border="0" usemap="#ImageMap2"></p> </td> </tr> <tr> <td width="609" height="220" background="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_1_image.gif" align="left"> <ul> <ul> <br> 그와 그녀의 사정, <br> 레카,<br> 패트레이버,<br> 용자 라이딘,<br> 요술공주 밍키,<br> 트러블쵸콜렛,<br> 소년기사 라무,<br> 머신로보 바이칸-크로노스의 대역습,<br> 신팔검전,<br> 소년기사 라무네 등등 20 여편을 <font class=mystyle2>무료</font>로 감상하실수 있습니다.<br><br> 대한민국에서 무료애니메이션이 가장많은곳 - <font class=mystyle1>BA</font> 입니다. </ul> </ul> </td> </tr> <tr> <td width="609"> <p> </p> </td> </tr> <tr> <td width="609"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_2.gif" width="620" height="30" border="0" usemap="#ImageMap3"></p> </td> </tr> <tr> <td width="609"> <table cellpadding="0" cellspacing="0" background="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_line.gif"> <tr> <td width="611" height="196" align="left"> <table cellpadding="0" cellspacing="0" width="620" background="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_line.gif"> <tr> <td width="274" height="206" align="center"> <a href="http://www.bestanime.co.kr/comic/comic_main.html" target="_top"> <img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_2_imgani2.gif" width="225" height="187" border="0"></a> </td> <td width="346" height="206" align="left"> 기동경찰 패트레이버, 요술공주 밍키, 로도스도전기,<br> VS 기사 라무네, 머신로보 바이칸 등등<br> <font class=mystyle2>-38작품 총502편이 추가되었습니다.</font><br> 그동안 볼 애니가 없어서 고민하셨던 분들.<br> 얼른 베스트애니메로 오세요.<br> <font class=mystyle2>무료극장</font>은 덤입니다.<br><br> 대한민국에서 상영작품수가 가장많은곳 - <font class=mystyle1>BA</font>입니다. </td> </tr> </table> </td> </tr> <tr> <td width="611"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_down.gif" width="620" height="3" border="0"></p> </td> </tr> </table> </td> </tr> <tr> <td width="609"> <p> </p> </td> </tr> <tr> <td width="609"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_3.gif" width="620" height="30" border="0" usemap="#ImageMap4"></p> </td> </tr> <tr> <td width="609"> <table cellpadding="0" cellspacing="0" background="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_line.gif"> <tr> <td width="611" height="128" align="left"> <table cellpadding="0" cellspacing="0" width="620"> <tr> <td width="250" height="133" align="center"> <a href="http://www.bestanime.co.kr/comic/comic_main.html" target="_blank"><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_3_image" width="209" height="106" border="0"></a> </td> <td width="370" height="133"> 코믹플러스만화방, N4만화방, 망가짱만화방 등 엄청난 수의<br> 만화방들이 베스트애니메에 둥지를 틀고 오픈하였습니다.<br><br> 전세계 애니메이션과 만화를 한곳에서<br> <font class=mystyle5>- <font class=mystyle1>BA</font>에서라면 가능합니다.</font> <br><br> 전세계 모든 애니메이션과 만화를 한곳에서<br> <font class=mystyle5>- <font class=mystyle1>BA</font>에서라면 가능합니다.</font> </td> </tr> </table> </td> </tr> <tr> <td width="611"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_down.gif" height="3" border="0" width="620"></p> </td> </tr> </table> </td> </tr> <tr> <td width="609"> <p> </p> </td> </tr> <tr> <td width="609" height="28"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21title_4.gif" width="620" height="30" border="0" usemap="#ImageMap5"></p> </td> </tr> <tr> <td width="609"> <table cellpadding="0" cellspacing="0" background="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_line.gif" width="613"> <tr> <td width="613" height="65"> <table cellpadding="0" cellspacing="0" width="602"> <tr> <td width="499" height="128"> <ul> <br> 기존의 공동구매와 더불어서 국내 최대의 온라인 만화서점 코믹스톰과 함께<br> BA 만화서점을 오픈하였습니다.<br> 일반 판매가에서<font class=mystyle2>항상 20%</font>를 할인하여 판매하며,<br> 특별판매의 경우에는최대<font class=mystyle2> 67%</font>까지<font class=mystyle3> 폭탄세일</font>도 실시하고 있습니다.<br><br> <font class=mystyle4>회원여러분의 많은 이용 바랍니다<br></font> </ul> </td> <td width="103" height="128" align="right"> <a href="http://www.bestanime.co.kr/frame/mainFrame.html?type=comicstorm" target="_blank"><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21shoppingimg.gif" width="100" height="110" border="0"></a> </td> </tr> </table> </td> </tr> <tr> <td width="613"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21titlebox_down.gif" width="620" height="3" border="0"></p> </td> </tr> </table> </td> </tr> <tr> <td width="609"> <p> </p> </td> </tr> <tr> <td width="609" height="81" align="center"> <img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21downment.gif" width="517" height="54" border="0"> </td> </tr> <tr> <td width="609" height="48" align="center"> <ul> <a href="http://www.bestanime.co.kr" target="_blank"><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21icon.gif" width="184" height="35" border="0"></a> </ul> </td> </tr> <tr> <td width="609"> <p> </p> </td> </tr> <tr> <td width="609" height="19"> <p><img src="http://www.bestanime.co.kr/images/mailling_img/3_21/img3_21down.gif" width="620" height="53" border="0" usemap="#ImageMap6"></p> </td> </tr> </table> </center> <map name="ImageMap1"> <area shape="rect" coords="16, 37, 605, 95" href="http://www.bestanime.co.kr" target="_blank"> </map><map name="ImageMap2"> <area shape="rect" coords="23, 3, 346, 29" href="http://www.bestanime.co.kr/theater/bavod.php?viewType=free" target="_blank"> </map><map name="ImageMap3"> <area shape="rect" coords="23, 3, 346, 29" href="http://www.bestanime.co.kr/theater/bavod.php" target="_blank"> </map><map name="ImageMap4"> <area shape="rect" coords="23, 3, 346, 29" href="http://www.bestanime.co.kr/comic/comic_main.html" target="_blank"> </map><map name="ImageMap5"> <area shape="rect" coords="25, 3, 346, 29" href="http://www.bestanime.co.kr/frame/mainFrame.html?type=comicstorm" target="_blank"> </map><map name="ImageMap6"> <area shape="rect" coords="423, 2, 498, 23" href="http://www.bestanime.co.kr/mailling/mailDeny.php" target="_blank"> </map></body> </html> |
From: Brian Z. <bri...@us...> - 2002-03-25 04:39:13
|
You don't have to use the full-blown Enhydra. Here's a hello world example I made quite a while ago using standalone XMLC: http://jywiki.sourceforge.net/index.php?JythonServletXmlc The best source available is the "Enhydra XMLC" book, ISBN 0672322110. It could be a little tricky for the setup if you're using JDK1.4. But once setup, it works like a charm. http://xmlc.enhydra.org and the corresponding mailing list has setup instruction and tips. Ask on xmlc mailing list for xmlc related questions, ask any jython related question here. Regards, -Brian ----- Original Message ----- From: "BillWorker 2i" <bil...@in...> To: "Brian Zhou" <bri...@us...> Sent: Sunday, March 24, 2002 7:26 PM Subject: Re: [Jython-users] JythonServlet over Java Servlet > > 3. With the combination of XMLC, it can achieve even better code/markup > > separation than model two JSP (taglib)! Think about it, do you prefer > > logic/iteration tags in the markup, or python for loop and list > > comprehension? > > > Any examples, tutorials on XMLC and Jython? I don't want to do a full > Enhydra stuff! > > Ashish > |
From: Brian Z. <bri...@us...> - 2002-03-25 01:45:12
|
First of all, Jython/Python is so much easier to write and __read__. When you use Java's collection, that part of the Java code pretty much degenerate to dynamic typing. JythonServlet runs under the jython interpreter. PyServlet takes care of caching and reloading. So as soon as you change your jython servlet code, it's reflected on the page. This at least saves a compilation and java .class reloading step. Jython can use both java API and most python libraries. I once ported a wiki implementation from CPython CGI to Jython, very straightforward. It determines one method to invoke during runtime, and dynamically evaluate it. I don't think using Java servlet would be as easy. You can argue JSP also provides automatic compilation and reloading. True. But, 1. JythonServlet only needs JRE to run 2. It can achieve the same result of model one JSP without the need of a specialized embedded language (JSP) 3. With the combination of XMLC, it can achieve even better code/markup separation than model two JSP (taglib)! Think about it, do you prefer logic/iteration tags in the markup, or python for loop and list comprehension? The performance may not be as good as Java Servlet, but you can always optimize the performance critical part in Java. I often wonder why Jython Servlet hasn't caught on - IMO it's mainly because the developer need to understand 1) Java 2)Java servlet 3) Python, and realize the advantage of this combination. -Brian Zhou ----- Original Message ----- From: <Ale...@di...> To: <jyt...@li...> Sent: Sunday, March 24, 2002 10:31 AM Subject: [Jython-users] JythonServlet over Java Servlet > I was just looking at the examples of JythonServlet, and I was wondering: > why would you want to use jython to create the servlet, instead of using > java ? I mean that it doesn't save you any of the steps that you have to go > through when creating a java servlet, but rather you just have to use > python syntax to accomplish the stuff that you otherwise would do in java > (which sometimes feels a little awkward: to type java code, with the java > libraries etc. with python syntax) . > > I love the integration of Jython and Java, and I like that I can do stuff > (e.g. using all the java libs in jython, extending ) that I otherwise > wouldn't be able to do in CPython (since I am not much into C++ -> I could > read it but I doubt I could produce anything beyond basic stuff ) , but I > didn't see the value that jython adds to a servlet. > > Would anybody give me a perspective on this ? > > > Thanks, > > Alex Kotchnev > Diversified Information Technologies > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: brian z. <bz...@zi...> - 2002-03-24 23:40:57
|
Noel, I have not use Poolman but have heard good things about (though I see the SF project has stopped being supported). I generally either use an app server's pool if running in [Py]Servlet or a ConnectionPooledDataSource if I'm running the interpreter or just coding a script. In general I don't have too many threads in scripts so it's not generally a big deal. When I deal with threads it's primarily in an appserver in which case the provided pool is generally sufficient. hope this helps, brian > -----Original Message----- > From: Noel Rappin [mailto:no...@ya...] > Sent: Saturday, March 23, 2002 1:46 PM > To: brian zimmer; Ale...@di...; > jyt...@li... > Subject: RE: [Jython-users] zxJDBC not committing ? > Importance: High > > > > > > >[NOTE] Since both the Python DB API and JDBC have .commit() on the > >connection be careful with threads. A connection used to create > >cursors across threads is dangerous since one thread might call > >.commit() on the connection while other threads are in the middle of > >something. It is best to allocate a new connection per > thread or use a > >connection pool (Datasource or otherwise) to make sure no > two threads > >are sharing a single connection. > > Brian -- while we're on the subject I have a follow up > question... is there > a connection pool tool that you've used with zxJDBC that > works particularly > well (or works at all)? I've been looking around for pool > tools that hit > the JDBC 2.0 spec (which it seems like zxJDBC needs), and > haven't found > anything that I really like. > > Thanks, > > Noel > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > |
From: Syver E. <syv...@on...> - 2002-03-24 22:31:31
|
Ale...@di... writes: > I was just looking at the examples of JythonServlet, and I was > wondering: > > why would you want to use jython to create the servlet, instead of > using java ? Hmm, let's say you know how to use python, have python libraries that you know, and just plain like to program in python. But, your project is to be deployed on the java platform, so you use jython because that is python for the java platform. If the platform was win32 you'd use python for windows, if it was AS/400 you'd use python for AS/400 etc., etc. If you'd like to write your application in another language than python for a specific application platform, than you do that instead. Ok? -- Vennlig hilsen Syver Enstad |
From: Brad C. <bk...@mu...> - 2002-03-24 19:42:28
|
On 24 Mar 2002 at 13:31, Ale...@di... wrote: > I love the integration of Jython and Java, and I like that I can do stuff > (e.g. using all the java libs in jython, extending ) that I otherwise > wouldn't be able to do in CPython (since I am not much into C++ -> I could > read it but I doubt I could produce anything beyond basic stuff ) , but I > didn't see the value that jython adds to a servlet. > > Would anybody give me a perspective on this ? I just returned from Novell's Brainshare, where I gave a presentation titled "Rapid Application Development with Jython". The big things I pointed out: 1. Python syntax is simpler and easier to read because there's less stuff (no braces, simpler iteration) 2. Python libraries often contain stuff not available in Java 3. I can re-use code between CPython and Jython, and this is realistic for the applications I'm developing. IE, Using Beans on Jython and ActiveX controls on Cpython/Windows. All the code is the same, just the top import is different 4. I converted several sample Novell java apps to Python. All of them converted to a smaller size, typically a 50% reduction in size. One example, I went from 5 pages of Java to 1 page of Python. 5. For admins and those IT folks who do not have much development experience, Python gets them started faster, with less overhead. 6. Interactive testing of Java components is a big win. Yes, there's interpreted Java, but it's not as efficient. JinSitu is very nice. (wish it was built-in to Jedit) Brad Clements, bk...@mu... (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements |
From: <Ale...@di...> - 2002-03-24 18:32:24
|
I was just looking at the examples of JythonServlet, and I was wondering: why would you want to use jython to create the servlet, instead of using java ? I mean that it doesn't save you any of the steps that you have to go through when creating a java servlet, but rather you just have to use python syntax to accomplish the stuff that you otherwise would do in java (which sometimes feels a little awkward: to type java code, with the java libraries etc. with python syntax) . I love the integration of Jython and Java, and I like that I can do stuff (e.g. using all the java libs in jython, extending ) that I otherwise wouldn't be able to do in CPython (since I am not much into C++ -> I could read it but I doubt I could produce anything beyond basic stuff ) , but I didn't see the value that jython adds to a servlet. Would anybody give me a perspective on this ? Thanks, Alex Kotchnev Diversified Information Technologies |
From: Sandy N. <san...@ho...> - 2002-03-24 16:33:19
|
Hi Jythonistas, Since I've just managed used jython and the orion app server together, thought it might be nice to share the xperience, which was astonishingly smooth. You can download the orion server at http://www.orionserver.com and there's an article about it at http://serverwatch.internet.com/reviews/app-orion.html This howto is inspired and probably borrows heavily from http://jywiki.sourceforge.net/index.php?JythonServlet BTW this is for the windows version. You're on your own with linux, but it then again it should probably be easier (-: Here's what I did: (1) install orion in orion_path (I used version 1.5.4) (2) install jython (unless you have already) in jython_path (jython21) (3) create a folder (let's call it jytest) in orion_path\default-web-app e.g C:\servers\orion\default-web-app\jytest this will contain your jython servlet scripts. (see below for an example which you can copy and paste to jytest) (4) open up jython_path and copy jython_path\jython.jar and jython_path\lib folder to orion_path\default-web-app\WEB-INF\lib e.g. C:\servers\orion\default-web-app\WEB-INF\lib\Lib C:\servers\orion\default-web-app\WEB-INF\lib\jython.jar (5) make an empty folder 'jython' in orion_path\default-web-app\WEB-INF e.g. C:\servers\orion\default-web-app\WEB-INF\jython This will be in your python sys.path, so I guess additional modules, etc.., can be put here. But maybe you have another use. (6) modify web.xml in orion_path\default-web-app\WEB-INF so that it looks something like below (of course making sure that param-value contains the path of the directory in which jython.jar resides) web.xml will probably look something like this: <?xml version="1.0"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <!-- A demo servlet, add servlets below --> <servlet> <servlet-name>snoop</servlet-name> <servlet-class>SnoopServlet</servlet-class> </servlet> <servlet> <servlet-name> pyservlet </servlet-name> <servlet-class> org.python.util.PyServlet </servlet-class> <init-param> <param-name>python.home</param-name> <param-value>C:\servers\orion\default-web-app\WEB-INF\lib</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name> pyservlet </servlet-name> <url-pattern>*.py</url-pattern> </servlet-mapping> </web-app> (7) start orion by type java -jar orion.jar (8) point your browser to http://localhost/jytest/cal.py and you there you are! see that you are now using both both java and jython libs (apologies if this is misformatted) # --- cal.py ----------------------------------------------------------# test jython servlet # java libs import java, javax # python libs import os, calendar html=''' <html> <head> <title>test</title> </head> <body> <p>Today is %(date)s</p> <table align='center' cellpadding=20> <tr> <td>%(cal1)s</td><td>%(cal2)s</td> </tr> </table> <br> Current working directory: %(dir)s <br> <br> files: <font size=-1>%(files)s</font> <br> <br> Information: <hr> %(info)s <br> </body> </html> ''' class cal(javax.servlet.http.HttpServlet): def doGet(self, request, response): response.setContentType("text/html") out = response.getOutputStream() print >> out, html % { 'date': java.util.Date(), 'cal1': make_calendar(2002,2), 'cal2': make_calendar(2002,3), 'dir': os.getcwd(), 'files': os.listdir(os.getcwd()), 'info' : getInfo(request) } out.close() return def make_calendar(year, month): ''' this cool snipplet is due to some other nifty soul other than me... who wrote it originally in python... ''' month_cal = calendar.monthcalendar(year, month) scal = '' scal += "<B>%s.%s</B>" % (month, year) scal += "<TABLE BORDER=1>" for week in month_cal: scal += "\n<TR>" for day in week: scal += "<TD>%s</TD>" % (day or " ") scal += "</TR>" scal += "</TABLE>" return scal def getInfo(request): d = { "JSP Request Method:" : request.getMethod(), "Request URI:": request.getRequestURI(), "Request Protocol:": request.getProtocol(), "Servlet path:" : request.getServletPath(), "Path info": request.getPathInfo(), "Path translated": request.getPathTranslated(), "Query string": request.getQueryString(), "Content length": request.getContentLength(), "Content type": request.getContentType(), "Server name": request.getServerName(), "Server port": request.getServerPort(), "Remote user": request.getRemoteUser(), "Remote address": request.getRemoteAddr(), "Remote host": request.getRemoteHost(), "Authorization scheme": request.getAuthType(), "browser": request.getHeader("User-Agent") } table = '<table align=center border=1>' x = 1 for key in d.keys(): table += '<tr><td bgcolor=%s>%s: %s</td></tr>' % (x and '#CCCCCC' or 'white', key, d[key]) x = not x table += '</table>' return table # --------------------------------------------------------------------- Hope this works for you. (-: best regards, Sandy _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
From: Noel R. <no...@ya...> - 2002-03-23 19:50:49
|
> >[NOTE] Since both the Python DB API and JDBC have .commit() on the >connection be careful with threads. A connection used to create cursors >across threads is dangerous since one thread might call .commit() on the >connection while other threads are in the middle of something. It is >best to allocate a new connection per thread or use a connection pool >(Datasource or otherwise) to make sure no two threads are sharing a >single connection. Brian -- while we're on the subject I have a follow up question... is there a connection pool tool that you've used with zxJDBC that works particularly well (or works at all)? I've been looking around for pool tools that hit the JDBC 2.0 spec (which it seems like zxJDBC needs), and haven't found anything that I really like. Thanks, Noel _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: brian z. <bz...@zi...> - 2002-03-23 15:01:43
|
Alex, You are correct that the code snippet below will not commit the transaction. By default, the cursor created by calling .cursor() is not in auto-commit mode. In order to commit your statements you need to do one of the following: [1] execute db.commit() after a series of statements you want commited [2] turn on auto-commit To do [2]: db = zxJDBC.connect(database, dbuser, dbpass, driver) # no statements will be auto-commited print db.autocommit c = db.cursor() c.execute("create table a (b int, c int)") c.execute("insert into a values (1, 1)") c.execute("insert into a values (1, 2)") c.execute("insert into a values (1, 3)") db.commit() # all statements will now be auto-commited db.autocommit = 1 print db.autocommit c.execute("insert into a values (1, 4)") # db.commit() is unnecessary since the change is auto-commited db.close() It also makes sense that the interactive interpreter's queries worked because you were within the same database session and as such had access to the uncommited changes. [NOTE] Since both the Python DB API and JDBC have .commit() on the connection be careful with threads. A connection used to create cursors across threads is dangerous since one thread might call .commit() on the connection while other threads are in the middle of something. It is best to allocate a new connection per thread or use a connection pool (Datasource or otherwise) to make sure no two threads are sharing a single connection. I'll update the documentation to make this more apparent. Let me know if you have any other issues. thanks, brian > -----Original Message----- > From: jyt...@li... > [mailto:jyt...@li...] On Behalf > Of Ale...@di... > Sent: Friday, March 22, 2002 10:22 PM > To: jyt...@li... > Subject: [Jython-users] zxJDBC not committing ? > Importance: High > > > I am putting together a simple application which has to > update an MSSQL > database. Here is what I do: > > database = "jdbc:microsoft:sqlserver://localhost:1433" > dbuser = "user" > dbpass = "password" > driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver" > > > db = zxJDBC.connect(database, dbuser, dbpass, driver) > dbcursor = db.cursor() > dbcursor.execute("Use PRS") > > ............................... > batchname = 'abcdef' # generated as the application goes > through a couple > of directories > curtime = time.strftime("%m-%d-%Y %H:%M:%S",time.localtime()) > stmt = "INSERT INTO dbo.FTP_Recon (Batch_name, Date_sent) VALUES > ('%s','%s')" % (batchname,curtime) > cursor.execute(stmt) > > ...... > dbcursor.close() > db.close() > > > So, what happens is this: when I run the whole script, it > doesn't seem to > update anything. However, if I start the query analyzer after > I run the > script, it seems like mssql is messed up because if I run a > query on it, it > wouldn't go for quite a while. > > Now, if I run these commands at the python shell, they > execute ok. After I > do the insert statement, if I do a "select * from FTP_recon" > it gives me a > result , reflecting the insert statement. However, if I run a > query in the > query analyzer to see whether the database has updated, it > shows me that it > hasn't. > > Any ideas / hints why it is not inserting the data , or it is > not commiting > the data to the database ? Btw, it is not a permissions problem in the > mssql since I log into query analyzer with the same username > that I use in > the script...Also, when I run the same query in the query analyzer, it > works just fine. > > > Thanks, > > Alex Kotchnev > Diversified Information Technologies > > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |
From: <Ale...@di...> - 2002-03-23 04:22:47
|
I am putting together a simple application which has to update an MSSQL database. Here is what I do: database = "jdbc:microsoft:sqlserver://localhost:1433" dbuser = "user" dbpass = "password" driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver" db = zxJDBC.connect(database, dbuser, dbpass, driver) dbcursor = db.cursor() dbcursor.execute("Use PRS") ............................... batchname = 'abcdef' # generated as the application goes through a couple of directories curtime = time.strftime("%m-%d-%Y %H:%M:%S",time.localtime()) stmt = "INSERT INTO dbo.FTP_Recon (Batch_name, Date_sent) VALUES ('%s','%s')" % (batchname,curtime) cursor.execute(stmt) ...... dbcursor.close() db.close() So, what happens is this: when I run the whole script, it doesn't seem to update anything. However, if I start the query analyzer after I run the script, it seems like mssql is messed up because if I run a query on it, it wouldn't go for quite a while. Now, if I run these commands at the python shell, they execute ok. After I do the insert statement, if I do a "select * from FTP_recon" it gives me a result , reflecting the insert statement. However, if I run a query in the query analyzer to see whether the database has updated, it shows me that it hasn't. Any ideas / hints why it is not inserting the data , or it is not commiting the data to the database ? Btw, it is not a permissions problem in the mssql since I log into query analyzer with the same username that I use in the script...Also, when I run the same query in the query analyzer, it works just fine. Thanks, Alex Kotchnev Diversified Information Technologies |
From: Samuele P. <pe...@in...> - 2002-03-23 04:14:17
|
From: Edward Povazan <epo...@te...> > Ok, I have recreated the error in a separate test. > Do you know where I can start looking in the source, where the import > actually occurs. > Or is there someone who 'maintains' the import code that would be interested > to see this? Maybe you refer to me <wink>. I'm guilty for much of the import logic impl. Sorry for the duplicated work but when I asked: [me] >The thing you haven't said to us >is that you are doing the > from impi.core import * >from a module inside impi.core, is that true? I had already code that duplicated the bug, I was exploring whether my work hypothesis matched your world(-view). > > No matter if I use * or a specific method/object, the error still occurs. > I never said the contrary, inside impi.core.editors all from impi.core import * from impi.core import Impi import impi.core import impi will fail. The situation is more involved that it already seems <wink>. [*] At some point we [the devels] decided that NoClassDefFoundError should be treated differently than ClassNotFoundException, and not transformed in import errors, but just propagated up to the user. Because it can contain valuable debug info. So the naive fix that we can apply - leaving [*] as it is - would fix the problem as long as sys.path is disjunct from classpath... So the point is that maybe we should rethink about [*]. For your case, I don't know if this is acceptable for you, but I would move the java classes in impi.core.jclasses, jclasses being a java package (a dir without __init__.py), and putting the right package statements in the java sources. Then you can put a from jclasses import * or from impi.core.import * inside impi.core.__init__ and murphy-willing things should work, unless other subtlilities block this approach too. regards. |
From: Edward P. <epo...@te...> - 2002-03-23 02:56:32
|
> A-ah, :) thanks for your trouble at least now it is not me. Looks like I need to reread about python import. > PS: as a style note it is better to avoid import * > in production code. Yes, I normally do, except that impi.core has most of the 'brains' of my app, and it is used often. I have tried to import the specific files I need. Seems that Impi.class still causes problems. from impi.core import Whatever still causes problems. I will write some test code separate from my app, and see if I can figure it out. Thanks -Ed |
From: Samuele P. <pe...@in...> - 2002-03-23 01:17:07
|
From: Edward Povazan <epo...@te...> > Ok, > I have __init__.py in the proper places. > I have this hierarchy > /impi > /impi/core > /impi/core/Impi.class # java class with static methods, ie "looks like a > module" > /impi/core/editors.py # a bunch of basic gui's used by the app. > > In a jython console, I can do this: > from impi.core import * # works ok but does it get you Impi? it shouldn't. > from impi.core.editors import * # I get the exception here > > editors.py contains: > from impi.core import * > > > But so your from impi.core import * will never > > get you the Java class. Anyway why the error? > In the console > from impi.core import * works fine, and I can call the static methods in > class Impi. Just when import is from another file, I get the problem. > > > The thing you haven't said to us > > is that you are doing the > > from impi.core import * > > from a module inside impi.core, is that true? > Yes, from editors.py A-ah, you get the error because Python import are interpreted first as relative to the package of the current module: that means that inside import.core.editors from impi.core import * tries from impi.core.impi.core import * before from impi.core import * # top-level impi now the first should fallback to the second because Impi.class is not impi something, So it seems we have still a case-sensitivity problem we shouldn't have anymore. That one is a bug :(!. OTOH from py.pkg import * never gets to the possible Java classes inside py.pkg, the single import yes or if you have already imported them otherwise. from java.pkg import * works OTOH. Now for a workaround, it really depends on what do you want to get with from impi.core import *? regards. PS: as a style note it is better to avoid import * in production code. |