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: Jeff E. <je...@ad...> - 2002-02-08 16:04:01
|
Now I have a test case that will crash the jvm for me under JDK1.4 on Win2K. Feed crash.py to jython. If it doesn't crash the jvm, try changing the value of m. Can anyone find a way to determine where the jvm's fault lies so that I can file a bug report with Sun? I wrote: > > Until recently, I've been using Jython 2.1a3 and JDK1.3.1 > on a 2-CPU Win2K box with great success. I just switched to > JDK1.4rc and am having terrible problems with the JVM crashing. > I upgraded to Jython 2.1, but the same problems remain. It's not > as bad with java -server, except that runs substantially slower. > Unfortunately, I can't seem to recreate the problem in an isolated > test case. |
From: Syver E. <syv...@on...> - 2002-02-08 09:11:45
|
<ni...@bi...> writes: > Hi guys, > > I am new to Jython and I want to learn it completely. I need tutorials > that shows the usage of Jython interpreter from Java code. When I > checked the jython.org I saw that there is only Python tutoril, no > Jython tutorial there. I need good Jython tutorials on net. Do you > have any suggestions, are there any good Jython tutorials on net? Get jython for java programmers from new riders. It's a must, at least it was for me. I was totally in the dark before getting it. Helped a lot, and I didn't even know java. -- Vennlig hilsen Syver Enstad |
From: ¾È³»¸ÞÀÏ<rep...@em...> - 2002-02-07 16:08:54
|
<html><head><title>가몽 구인구직정보(job.gamong.com)</title></head><body> [채용정보/인재정보] 원하시는 채용정보/인재정보만을 무료로 구독하세요. - (광.고.) <BR><BR> <div style="font-size:10pt; line-height:140%;"> 안녕하세요?<br> 저희는 국내외 구인구직관련 사이트들 중에서<br> 가장 우수한 <b>조건부구독 및 맞춤통보(Conditional Subscription and Match Notification) 서비스</b>를 제공하는<br> 채용정보/인재정보 전문 사이트, <a href="http://job.gamong.com" target="_blank"> 가몽 구인구직정보(http://job.gamong.com) </a> 입니다.<br> <br> <br><br> <center><h4><b>가몽 구인구직정보가 제공하는 서비스 안내</b></h4></center> <br> <b>(1) 조건부구독 및 맞춤통보(Conditional Subscription and Match Notification) 서비스</b><br> <br> - 회원님께 꼭 맞는 채용정보/인재정보를 확인하시기 위해 매일 저희 가몽 구인구직정보 사이트에 들어오실 필요는 없습니다. <br> - 저희 <a href="http://job.gamong.com" target="_blank">가몽 구인구직정보(job.gamong.com)</a>에서는 채용정보/인재정보에 대해 귀하께서 원하시는 항목들을 미리 입력해두시면, <u>귀하께서 구독신청하신 조건과 일치되는 채용정보/인재정보가 새로 등록되는 순간 귀하께 E-mail을 통해 자동으로 통보</u>해드리는 「조건부구독 및 맞춤통보 서비스」를 제공합니다.<br> - 따라서, 구독자(개인/기업) 입장에서는 현재 저희 사이트에서 원하시는 조건의 채용정보/인재정보를 못찾으시더라도 향후에 구독신청하신 조건과 일치되는 채용정보/인재정보가 신규로 등록되는 순간 맞춤통보 E-mail을 받으실 수 있으므로 신속하게 알짜배기 채용정보/인재정보를 획득하실 수 있습니다. <br> - 한편, 등록자(개인/기업) 입장에서는 등록시 등록과 동시에 실질적인 타겟이 되는 실수요자(개인/기업)들에게 자동으로 통보메일이 발송되므로 신속정확한 홍보효과를 보실 수 있습니다.<br> <center><br><br><b>조건부구독 및 맞춤통보 서비스의 사용단계 3 Layers</b><br><table border="1" width="95%"> <tr><td> 사용단계 </td><td> 기대효과 </td><td> 사용방법 </td></tr> <tr><td> <b><nobr>1. 기존정보찾기</nobr></b><br>(인증이 안된 익명의 방문자도 가능)</td><td style="font-size:10pt;"> 기존의 채용정보/인재정보에서 원하시는 조건의 정보획득가능 </td><td style="font-size:10pt;"> 구인/구직 목록의 위나 아래에 있는 검색양식에 원하시는 조건을 입력하여 검색하기 </td></tr> <tr><td> <b><nobr>2. 구독신청하기</nobr></b><br>(로그-인한 무료회원가능)</td><td style="font-size:10pt;"> 향후에도 신속한 알짜배기 채용정보/인재정보만 선별하여 획득가능</td><td style="font-size:10pt;"> 검색결과를 보시고 향후에도 해당 검색조건으로 구독신청을 원하시면, 검색양식의 상단에 있는 [구독신청]링크를 클릭하여 구독신청하기 <br>(구독의 해지: 구독신청 후 검색양식의 상단에 생기는 [구독해지]링크클릭 한번으로 <u><b>언제나 간단히 구독해지가 가능</b></u>) </td></tr> <tr><td> <b><nobr>3. 정보등록하기</nobr></b><br>(로그-인한 무료회원가능)</td><td style="font-size:10pt;"> 자기정보(채용정보/인재정보)의 DB화 및 실수요자(개인/기업)들에 대한 맞춤통보로 능동적인 홍보가능 </td><td style="font-size:10pt;"> 구인/구직 목록의 위나 아래에 있는 [구인등록]/[구직등록]링크를 클릭한 후, 나온 등록양식에 자기가 보유한 채용정보/인재정보를 입력하여 등록하기 <br>(정보의 삭제: 추후의 정보삭제는 정보등록시 사용된 사용자로 로그-인하면, [삭제]링크클릭 한번으로 언제나 간단히 정보삭제가 가능) </td></tr> </table>* 단, 구독신청/정보등록(<u><b>무료회원가능</b></u>)은 로그-인한 회원만 가능하므로 [무료회원가입]을 먼저 하시기 바랍니다.</center> <!-- - 취업을 원하시는 개인사용자는...<br> 구직등록을 하시면,기업사용자들에게 맞춤통보 E-mail이 발송되며, 기존의 구인목록을 검색하셔서 원하시는 채용정보를 찾아내시거나, 해당 검색조건으로 구인목록에 대해 조건부구독 신청을 하시면, 추후에 신규로 등록되는 채용정보중 일치하는 채용정보는 맞춤통보 E-mail로 알려드립니다. 예) 취업을 원하는 홍길동씨 - 채용을 원하시는 기업사용자는... 예) 채용을 원하는 abc사 --> <br> <br><br> <b>(2) 채용정보/인재정보를 DB화한 다양하고 편리한 검색서비스</b><br> <br> - 기존의 구인구직사이트들과 달리 저희 <a href="http://job.gamong.com" target="_blank">가몽 구인구직정보(job.gamong.com)</a>는 어느페이지에서나 상위분류/하위분류 간의 이동/검색/해제가 매우 간편합니다.<br> - 다양한 조건으로 채용정보를 검색: 직종, 업무설명, 회사명, 자격요건, 지역, 경력, 학력, 성별, 고용형태, 뿐만 아니라 업체의 업종 및 업체종류(일반기업,대기업,외국계등)로도 검색이 가능합니다.<br> - 다양한 조건으로 인재정보를 검색: 직종, 희망업무, 이름, 자격증/면허, 경력, 학력, 희망고용형태, 성별, 연령 등으로 검색이 가능합니다.<br> <br><br> <b>(3) 채용뉴스 서비스</b><br> <br> <b>(4) 각종 자격증, 검정 시험정보 서비스</b><br> <br> <b>(5) 각종 고용 정보 및 통계정보 서비스</b><br> <br> <b>(6) 기타 여러가지 부가정보 서비스</b><br> <br> <br> <center><h3><a href="http://job.gamong.com" target="_blank"> 가몽 구인구직정보의 홈페이지<br> http://job.gamong.com <br>으로 바로가기 </a></h3></center> <br> 여기까지 읽어주셔서 감사합니다. <br> Your BeautifulDreams ComeTrue - gamong.com <br> </div> <font size="2" style="font-size:9pt;"> <br><br><hr><br> [정보통신망이용촉진 및 정보보호에 관한 법률에 의거 표시]<br> <br> 허락없이 메일을 보내서 대단히 죄송합니다.<br> 이 메일은 웹서핑 도중 공개된 수신자님의 메일을 보고 보내드리는 광고입니다.<br> 결코, 메일주소이외의 수신자님에 대한 어떤 정보도 가지고 있지 않습니다.<br> 메일 수신을 원치않으시면 <a href="mailto:ki...@hi...?subject=[job수신거부]">수신거부</a>를 해주십시요.<br> 만약 불필요한 정보였다면 사과 드립니다.<br> </font> </body></html> |
From: Steve C. <St...@ig...> - 2002-02-07 00:22:22
|
I've just gotten Robert Bill's book "Jython for Java Programmers" and I really like it. I've been using Jython for about a year and a half but I've never made an exhaustive study of it and it's never been my primary language. I use it to accomplish lots of smallish tasks, most of which are related to zxJDBC (full disclosure - Brian Zimmer is a former colleague of mine). =20 As a result of this haphazard learning curve, I don't always know what is available. I've been scanning the first few chapters for about half an hour, and every page seems to hit me with an "I didn't know you could do THAT" feeling. "If only I knew THAT, such-and-such a task would have been a breeze". For example, I never knew you could do=20 >>> import java >>> dir(java.util.ListIterator)=20 and see a list of method names for that interface. That is POWERFUL. Up to now I've had to scan javadoc pages and I've done so on hundreds of occasions while I was in jython Anyway, if you've been using Jython for awhile, but not intensively, this is a good book filling in the gaps in your knowlege. |
From: Edward P. <epo...@te...> - 2002-02-06 21:30:31
|
Oops, seems that there is another ActionListener class I am already importing. Don't know where, but: from java.awt import event and then using event.ActionListener solves my problems -Ed |
From: Edward P. <epo...@te...> - 2002-02-06 20:31:57
|
Can anyone see why this doesn't work. I have similar code elsewhere, and simple test cases work, but in my main application, I get an error: 'TypeError: javax.swing.Timer(): 2nd arg can't be coerced to java.awt.event.ActionListener' I just can't see why ... implement the interface, and send self as the reference ... just like I always do. Thanks -Ed from java.awt.event import ActionListener from javax.swing import Timer class Scanner(RTObject,ActionListener): def __init__(self,name): RTObject.__init__(self,name) self.timer=Timer(2000,self) self.timer.start() def actionPerformed(self,ev): pass |
From: Jeff E. <je...@ad...> - 2002-02-06 16:47:33
|
Until recently, I've been using Jython 2.1a3 and JDK1.3.1 on a 2-CPU Win2K box with great success. I just switched to JDK1.4rc and am having terrible problems with the JVM crashing. I upgraded to Jython 2.1, but the same problems remain. It's not as bad with java -server, except that runs substantially slower. Unfortunately, I can't seem to recreate the problem in an isolated test case. Last summer, someone posted that they couldn't even run pystone.py with the JDK1.4 beta. Curiously, when I run pystone.py with JDK1.3 and java -server, the JVM crashes. It works with JDK1.4 with and without -server. Has anyone else had similar experiences? Any suggestions? Jeff Emanuel pystone stats for the curious: C:\>java -showversion org.python.util.jython pystone.py java version "1.4.0-rc" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91) Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode) Pystone(1.1) time for 10000 passes = 1.655 This machine benchmarks at 6042.3 pystones/second C:\>java -server -showversion org.python.util.jython pystone.py java version "1.4.0-rc" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91) Java HotSpot(TM) Server VM (build 1.4.0-rc-b91, mixed mode) Pystone(1.1) time for 10000 passes = 2.718 This machine benchmarks at 3679.18 pystones/second C:\>java -showversion org.python.util.jython pystone.py java version "1.3.1_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01) Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode) Pystone(1.1) time for 10000 passes = 1.156 This machine benchmarks at 8650.52 pystones/second |
From: Noel R. <no...@ya...> - 2002-02-06 16:10:25
|
> if any one could give a similar review on 'Jython Essentials' by O'Reilly. I guess I'm qualified to jump in and talk about _Jython Essentials_. Our goal was to have the book be useful for both Python and Java programmers. That said, structurally, it's hard to do an introductory Jython book without spending time introducing the Python language. After we do that, we have a couple of chapters on Jython/Java integration, both on using Java data from Jython and subclassing Java from Jython. We tried to give usage examples that would be helpful either to a Java programmer who wasn't familiar with standard Python or to a Python programmer who wasn't familiar with Java. So we have a chapter on the use and availability of common Python library modules, and chapters or sections on JavaBeans, Swing, zxJDBC, Java-based XML tools, and Servlets. Finally, there are chapters on using embedded Jython interpreters and on using jythonc compilation. Appendices included an updated and expanded Jython/CPython differences list, and a quick-reference translation between basic Java constructs and Python constructs. So there is lots of useful information for both Python and Java programmers. And here's my shameless plug... we're online at <http://www.oreilly.com/catalog/jythoness/>. I hope this information is helpful. Samuele, anything to add? Thanks, Noel Rappin _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |
From: leon j. b. <lj...@ne...> - 2002-02-06 13:09:17
|
hi, i need to make all the classes in a specific package available to Jython script code without the code having to qualify the class names. this is what i currently do to do the import: /** * @see ScriptingEngine#importClass(String, Object) * @since 1.1.0 */ public void importClass(String name, Object namespace) throws ScriptingException { namespace = namespace == null ? module.__dict__ : namespace; if (!(namespace instanceof PyStringMap)) { throw new ScriptingException("Namespace is not a valid Python namespace"); } try { __builtin__.__import__(name, module.__dict__, (PyStringMap)namespace); } catch (PyException e) { throw new ScriptingException(e, "Could not import \"" + name + "\""); } } and this gets invoked after the namespace for the script has been created. this is how scripts are compiled: /** * @see ScriptingEngine#compile(String) * @since 1.1.0 */ public Object compile(String code) throws ScriptingException { try { PyCode cobj = Py.compile_flags( code, STRING_FILE_NAME, TYPE_EXEC, null); return cobj; } catch (PyException e) { throw new ScriptingException(e, "Could not compile Python code"); } } and this is how they are run: /** * @see ScriptingEngine#run(Object, Object) * @since 1.1.0 */ public Object run(Object obj, Object namespace) throws ScriptingException { if (!(obj instanceof PyCode)) { throw new ScriptingException("Object is not compiled Python code"); } if ((namespace != null) && (!(namespace instanceof PyStringMap))) { throw new ScriptingException("Namespace is not a valid Python namespace"); } try { namespace = namespace == null ? module.__dict__ : namespace; return Py.runCode((PyCode)obj, (PyStringMap)namespace, module.__dict__); } catch (PyException e) { throw new ScriptingException(e, "Could not run Python code"); } } the namespace passed to importClass() is the same as the namespace the run() method takes. but i still get NameErrors in the actual scripts. what is the programmatic (in Java) equivalent of "from package import *"? thanks, leon. -- lj...@ne... :: +27.82.7890445 >> don't play in the kiln. |
From: Guy Gascoigne-P. <gg...@tr...> - 2002-02-06 11:13:20
|
Wow, that opens up a whole avenue of ways to integrate jython and java that I'd never realized. Thanks for the example; it makes things a whole lot clearer. Guy - who still can't believe just how cool jython is :-) -----Original Message----- From: bc...@wo... [mailto:bc...@wo...] Sent: Wednesday, February 06, 2002 2:52 AM To: 'jyt...@li...' Cc: Guy Gascoigne-Piggford Subject: Re: [Jython-users] Accessing Jython Regular Expressions from java [Guy Gascoigne-Piggford] >I guess that I didn't explain my self very clearly, though I think that you >did answer my question. I've written a java module that extends jython, I >want that java module to use regular expressions in the same way that jython >does. As you say No, that is not quite what I said. I meant that sre only works in a jython environment. >that would involve using sre and I can't do that from a >java module :-( A java class like this below can imported from jython and can make use of all the other jython modules, classes and functions. import org.python.core.*; public class y { public static void test() { // import re PyObject re = __builtin__.__import__("re"); // res = re.match(r"(source filename|Name of).*\?(?i)", "nAME OF ?") PyObject res = re.invoke("match", Py.java2py("(source filename|Name of).*\\?(?i)"), Py.java2py("nAME OF ?")); // print res.group(1) System.out.println(res.invoke("group", Py.newInteger(1))); } } Jython 2.1+ on java1.4.0-beta3 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import y >>> y.test() nAME OF regards, finn |
From: <bc...@wo...> - 2002-02-06 10:47:16
|
[Guy Gascoigne-Piggford] >I guess that I didn't explain my self very clearly, though I think that you >did answer my question. I've written a java module that extends jython, I >want that java module to use regular expressions in the same way that jython >does. As you say No, that is not quite what I said. I meant that sre only works in a jython environment. >that would involve using sre and I can't do that from a >java module :-( A java class like this below can imported from jython and can make use of all the other jython modules, classes and functions. import org.python.core.*; public class y { public static void test() { // import re PyObject re = __builtin__.__import__("re"); // res = re.match(r"(source filename|Name of).*\?(?i)", "nAME OF ?") PyObject res = re.invoke("match", Py.java2py("(source filename|Name of).*\\?(?i)"), Py.java2py("nAME OF ?")); // print res.group(1) System.out.println(res.invoke("group", Py.newInteger(1))); } } Jython 2.1+ on java1.4.0-beta3 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import y >>> y.test() nAME OF regards, finn |
From: Guy Gascoigne-P. <gg...@tr...> - 2002-02-06 09:48:06
|
I guess that I didn't explain my self very clearly, though I think that you did answer my question. I've written a java module that extends jython, I want that java module to use regular expressions in the same way that jython does. As you say that would involve using sre and I can't do that from a java module :-( Thanks - Guy -----Original Message----- From: bc...@wo... [mailto:bc...@wo...] Sent: Wednesday, February 06, 2002 12:29 AM To: 'jyt...@li...' Cc: Guy Gascoigne-Piggford Subject: Re: [Jython-users] Accessing Jython Regular Expressions from java [Guy Gascoigne-Piggford] >OK, so I was happily just using the oromatcher Perl5Compiler() routines to >handle python style regular expressions in my java code. Basically the >regular expressions get passed from the jython script through to a java >function of mine and I wanted to handle them in a python compatible way. It >turns out that I wasn't completely correct. > >I got code that actually worked pretty well until I started passing >expressions such as this to it: > >"(source filename|Name of).*\?(?i)" > >The gotcha is the (?i) bit at the end, this generates a mismatched >parenthesis error. I'm a little confused here. Are you reporting a bug in the way jython does regular expression or in way Perl5Compiler does them? >Now after a lot of delving I've discovered that jython actually uses a >completely different regular expression library - the one in the sre module. >My question is, since this is all python code, is there any way that I can >just call out to this from java? So you want to use sre from a pure java (no jython) application? If that is what you're asking, the answer is no, it can't be done. >It appears to me that by moving over to a >python implementation here I can't use the same stuff - so far I've found >one incompatibility between the two implementations, and I'm concerned that >I'll run into others. My confusion continues. I can compile the example re you gave with jython-2.1 without any errors: Jython 2.1 on java1.4.0-beta3 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import re >>> re.compile("(source filename|Name of).*\?(?i)") org.python.modules.sre.PatternObject@dd5a3d >Am I stuck with pre-processing the regular expressions and handling the (?i) >construct myself - I can't believe that's all that there is to it. The old Perl5Compiler based "pre" module did some fixup of the pattern before passing the pattern to Perl5Compiler. Se RegexObject.fixPattern() for details. >Any other alternatives? > >As an aside, why the switch to sre? Faster? No. >Better Python compatibility? Yes. The "pre" module have some known bugs in it. For example the parens counting in fixPattern doesn't work in all cases. regards, finn |
From: <ni...@bi...> - 2002-02-06 09:12:14
|
Hi guys, I am new to Jython and I want to learn it completely. I need tutorials that shows the usage of Jython interpreter from Java code. When I checked the jython.org I saw that there is only Python tutoril, no Jython tutorial there. I need good Jython tutorials on net. Do you have any suggestions, are there any good Jython tutorials on net? Thx. gurkan |
From: <bc...@wo...> - 2002-02-06 08:24:54
|
[Guy Gascoigne-Piggford] >OK, so I was happily just using the oromatcher Perl5Compiler() routines to >handle python style regular expressions in my java code. Basically the >regular expressions get passed from the jython script through to a java >function of mine and I wanted to handle them in a python compatible way. It >turns out that I wasn't completely correct. > >I got code that actually worked pretty well until I started passing >expressions such as this to it: > >"(source filename|Name of).*\?(?i)" > >The gotcha is the (?i) bit at the end, this generates a mismatched >parenthesis error. I'm a little confused here. Are you reporting a bug in the way jython does regular expression or in way Perl5Compiler does them? >Now after a lot of delving I've discovered that jython actually uses a >completely different regular expression library - the one in the sre module. >My question is, since this is all python code, is there any way that I can >just call out to this from java? So you want to use sre from a pure java (no jython) application? If that is what you're asking, the answer is no, it can't be done. >It appears to me that by moving over to a >python implementation here I can't use the same stuff - so far I've found >one incompatibility between the two implementations, and I'm concerned that >I'll run into others. My confusion continues. I can compile the example re you gave with jython-2.1 without any errors: Jython 2.1 on java1.4.0-beta3 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import re >>> re.compile("(source filename|Name of).*\?(?i)") org.python.modules.sre.PatternObject@dd5a3d >Am I stuck with pre-processing the regular expressions and handling the (?i) >construct myself - I can't believe that's all that there is to it. The old Perl5Compiler based "pre" module did some fixup of the pattern before passing the pattern to Perl5Compiler. Se RegexObject.fixPattern() for details. >Any other alternatives? > >As an aside, why the switch to sre? Faster? No. >Better Python compatibility? Yes. The "pre" module have some known bugs in it. For example the parens counting in fixPattern doesn't work in all cases. regards, finn |
From: Guy Gascoigne-P. <gg...@tr...> - 2002-02-06 02:53:45
|
OK, so I was happily just using the oromatcher Perl5Compiler() routines to handle python style regular expressions in my java code. Basically the regular expressions get passed from the jython script through to a java function of mine and I wanted to handle them in a python compatible way. It turns out that I wasn't completely correct. I got code that actually worked pretty well until I started passing expressions such as this to it: "(source filename|Name of).*\?(?i)" The gotcha is the (?i) bit at the end, this generates a mismatched parenthesis error. Now after a lot of delving I've discovered that jython actually uses a completely different regular expression library - the one in the sre module. My question is, since this is all python code, is there any way that I can just call out to this from java? It appears to me that by moving over to a python implementation here I can't use the same stuff - so far I've found one incompatibility between the two implementations, and I'm concerned that I'll run into others. Am I stuck with pre-processing the regular expressions and handling the (?i) construct myself - I can't believe that's all that there is to it. Any other alternatives? As an aside, why the switch to sre? Faster? Better Python compatibility? Thanks - Guy |
From: James A. <j_r...@ya...> - 2002-02-05 22:19:19
|
Greetings, all A couple of days back I read a thread about going from jython to java. I'm sort of in the process of doing that myself, so I figured I'd=20 throw up a web site that recounted my experiences, notes, CVS history, etc. Just in case anyone might be interested. Currently, it's extremely minimal (because the project on which I'm working isn't a real high priority right now). But, if anyone's curious enough to look at my preliminary work, it's at www.geocities.com/j_r_ashley/jython_index.html. Of course, there was at least a little bit of interest by others, or the topic would have never come up. I'd quite welcome anything that looks like meaningful info to anyone else. I plan on something resembling =20 LGPL for my parts (or maybe it's already public domain, since it's on the 'Net without a copyright notice), but anything anyone else posts could be licensed however you want (I think that's legal and such). Anyway, comments, feedback, flames, whatever...they're all appreciated. I'm not sure what e-mail address will actually show up as the From: on this. I've been having mail issues. It'll probably show either j_r...@ya... or ji...@di.... Either of those addresses works fine for a reply for now, but I don't know how much longer I'll be using dimensional.com. (And, no, it's *not* someone else's mail I hijacked...it's just that I'm moving and probably switching ISP's). Cheers, James |
From: Fred I. <in...@er...> - 2002-02-05 21:28:06
|
To all, I am attempting to embed Jython v2.1 into a Java Applet that will be run from Netscape 4.7x using the internal 1.1.x Java Virtual Machine. I was able to successfully instantiate a PythonInterpreter object after I had enabled the following Netscape privileges: UniversalFileAccess, UniversalPropertyRead, and UniversalPropertyWrite. However, when I try to invoke the exec() method on the PythonInterpreter object, I get the following stack trace: Traceback (innermost last): (no code object) at line 0 netscape.security.AppletSecurityException: security.checkcreateclassloader at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Compiled Code) at java.lang.RuntimeException.<init>(Compiled Code) at java.lang.SecurityException.<init>(Compiled Code) at netscape.security.AppletSecurityException.<init>(Compiled Code) at netscape.security.AppletSecurity.checkCreateClassLoader(Compiled Code) at java.lang.SecurityManager.checkCreateClassLoader(Compiled Code) at java.lang.ClassLoader.<init>(Compiled Code) * at org.python.core.BytecodeLoader1.<init>(Compiled Code) at org.python.core.BytecodeLoader.makeLoader(Compiled Code) at org.python.core.BytecodeLoader.makeClass(Compiled Code) at org.python.core.BytecodeLoader.makeCode(Compiled Code) at org.python.core.Py.compile_flags(Compiled Code) at org.python.core.Py.compile_flags(Compiled Code) at org.python.core.Py.compile_flags(Compiled Code) at org.python.util.PythonInterpreter.exec(Compiled Code) at wm.jython.JythonInterpreter.keyReleased(Compiled Code) at java.awt.Component.processKeyEvent(Compiled Code) at java.awt.Component.processEvent(Compiled Code) at java.awt.TextComponent.processEvent(Compiled Code) at java.awt.Component.dispatchEventImpl(Compiled Code) at java.awt.Component.dispatchEvent(Compiled Code) at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code) at java.awt.EventDispatchThread.run(Compiled Code) at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code) netscape.security.AppletSecurityException: netscape.security.AppletSecurityException: security.checkcreateclassloader I did enable UniversalClassLoaderAccess but that does not seem to give you the ability to create a new classloader... So the question is: how can one embed the Jython interpreter in a Java applet running on Netscape 4.7x using the internal 1.1.x Java Virtual Machine. Please cc: in...@er... with your reply. Thank you in advance for any assistance you are able to provide me. Fred |
From: Yang W. <yw...@pr...> - 2002-02-05 18:18:53
|
I figured it out: import os os.system("express.exe") Thanks for the responses I got! Yang -----Original Message----- From: Yang Wang=20 Sent: Tuesday, February 05, 2002 9:59 AM To: jyt...@li... Subject: [Jython-users] run an existing .exe file in Jython Hi All, We are using Jython to manipulate our Java classes. But now we have a need to run an existing .exe file (I do not even know in which language it was original written). Are there a way to run both of them in the same Jython session? The exe file is command driven, like "express.exe parameters", and no GUI. Thanks in advance! Yang _______________________________________________ Jython-users mailing list Jyt...@li... https://lists.sourceforge.net/lists/listinfo/jython-users |
From: Yang W. <yw...@pr...> - 2002-02-05 17:59:03
|
Hi All, We are using Jython to manipulate our Java classes. But now we have a need to run an existing .exe file (I do not even know in which language it was original written). Are there a way to run both of them in the same Jython session? The exe file is command driven, like "express.exe parameters", and no GUI. Thanks in advance! Yang |
From: Mats W. <ma...@la...> - 2002-02-05 15:00:02
|
At 03:03 PM 2/4/2002 +0100, Jan Wender wrote: >On Fri, Feb 01, 2002 at 11:35:23PM -0500, Niranjan V. wrote: >> I am defining a class within another class. The code is >> >> class OuterClass: >> class InnerClass: >> def __init__(self): >> #Trying to print the OuterClass 'Name' instance variable >> #But i am getting NameError >> print OuterClass.name >Well, one problem I see here: Name and age are attributes of the instance from >the OuterClass. In InnerClass you ask the *class* for the attribute, while only >the instance has it. >I don't think there is an easy way to get there. At first I thought nested >scopes would help, but I didn't see how you get hold of the OuterClass >instancesattributes in the InnerClass. Jython "inner classes" don't work the same way as in Java. In Python, a class is a class; when you define a class inside another class definition you've only affected the visibility of the name bound to the class object. If you want the InnerClass constructor to have access to an instance of OuterClass, you have to pass it in - or as the oft-quoted rule of Python goes: "explicit is better than implicit". Try this: # Inner class definition class InnerClass: # inner class constructor def __init__(self, other): print other.name # outer class constructor def __init__(self): self.name="outerclass" self.__age=23 def __printAge__(self): print self.__age ic = self.InnerClass(self) # pass instance if __name__=='__main__': oc = OuterClass() oc.__printAge__() |
From: Samuele P. <ped...@bl...> - 2002-02-05 03:09:02
|
> >Your .py file must have the same name as > >your class, and watch out for the message from jythonc that your > >python class is extending the java class, JApplet in your case. > > > Ok, I think this is where I am going wrong. The file i want to compile, wddxTreeApplet.py has four top level classes in it - wddxNode > (which extends swing.tree.DefaultMutableTreeNode), wddxTreeModel (extending swing.tree.DefaultTreeModel), wddxTree (extending > swing.JTree) and wddxTreeApplet (extending swing.JApplet). Some of those classes have private classes defined within them (eg > wddxTree includes a definition for class mouseListener(awt.event.MouseAdapter) ). > > Is it OK to have more than one top level class in a jython file to be compiled, or do I have to split those top-level classes into > wddxNode.py, wddxTreeModel.py, wddxTree.py and the existing wddxTreeApplet.py. Presumadly private classes are OK to be defined > within a previous class ? > What about if I want to use a natively written python class (i.e a class not extending any java class/interface), is that simply not possible > (I don't want to at the moment, but seems like it could be annoying to have to extend a java class for every class you want to write) ? > No you can have as many top-level classes as you like, both extending java classes or not. The class with the same name as the file will correspond to the class produced by jythonc (btw the other classes extending java will correspond to inner classes of the main java one (not that much important), the purely python classes have no such correspondence at all). For the rest you should consider that jythonc does a static analysis in order to understand which classes extend java classes, something plain as from javax.swing import JApplet class MyApplet(JApplet): ... import javax.swing class MyApplet(javax.swing.JApplet): ... should work. regards, Samuele Pedroni. |
From: James S. <bit...@ph...> - 2002-02-05 02:48:45
|
Syver Enstad <syv...@on...> wrote on 2/5/2002 1:34:50 PM: >I can recommend you get New Riders jython book. It goes through why >things like this happens really thoroughly and has been a lot of help to >me, in clearing these kinds of problems and understanding why they happen. I'll look it up, of course getting it in New Zealand might be a challenge (always Amazon I guess) :-) >Of the top of my head I can suggest, compiling your applet with the >--jar --core --deep options. Hmm, I thought I had tried jaring the small hello-world applet, just tried again and it worked (at least here at work on win2k, but should work at home as well, I'm using the same plugin version). So, I know that I can compile working applets :-) >Your .py file must have the same name as >your class, and watch out for the message from jythonc that your >python class is extending the java class, JApplet in your case. Ok, I think this is where I am going wrong. The file i want to compile, wddxTreeApplet.py has four top level classes in it - wddxNode (which extends swing.tree.DefaultMutableTreeNode), wddxTreeModel (extending swing.tree.DefaultTreeModel), wddxTree (extending swing.JTree) and wddxTreeApplet (extending swing.JApplet). Some of those classes have private classes defined within them (eg wddxTree includes a definition for class mouseListener(awt.event.MouseAdapter) ). Is it OK to have more than one top level class in a jython file to be compiled, or do I have to split those top-level classes into wddxNode.py, wddxTreeModel.py, wddxTree.py and the existing wddxTreeApplet.py. Presumadly private classes are OK to be defined within a previous class ? What about if I want to use a natively written python class (i.e a class not extending any java class/interface), is that simply not possible (I don't want to at the moment, but seems like it could be annoying to have to extend a java class for every class you want to write) ? >If >jythonc doesn't say this you got something wrong, imports or classpath >problems maybe. It's good to remember that jythonc compilation is nothing >like ordinary java compilation so don't count on really basic errors >being flagged just because it compiles. Yes, jythonc for the wddxTreeApplet isn't saying that wddxTreeApplet is extending JApplet (or anything for that matter), so I'm thinking that what I've said above is where the problem lies. >Be aware that you can specify more than one jar file in your applet >tag. >Like this: archive="jarnumberone.jar , jarnumbertwo.jar" Yep, got that :-) >This way you don't have to put all the files into the same jar. Alas I >have heard that this doesn't work with all browsers. It works on IE >6.0 which is what I have tested with. I believe it's a problem with NS up to 4.x, I don't care about NS up to 4.x (mozilla rules the world muharharhar) so it's not much of an issue. Thanks for your help --- James Sleeman |
From: Syver E. <syv...@on...> - 2002-02-05 00:36:01
|
James Sleeman <bit...@ph...> writes: > Hi all, > firstly, I'm a newbie to both jython and pretty much to java in > general (I've done a couple jobs in java, but nothing to write home > about), I can recommend you get New Riders jython book. It goes through why things like this happens really thoroughly and has been a lot of help to me, in clearing these kinds of problems and understanding why they happen. Of the top of my head I can suggest, compiling your applet with the --jar --core --deep options. Your .py file must have the same name as your class, and watch out for the message from jythonc that your python class is extending the java class, JApplet in your case. If jythonc doesn't say this you got something wrong, imports or classpath problems maybe. It's good to remember that jythonc compilation is nothing like ordinary java compilation so don't count on really basic errors being flagged just because it compiles. Be aware that you can specify more than one jar file in your applet tag. Like this: archive="jarnumberone.jar , jarnumbertwo.jar" This way you don't have to put all the files into the same jar. Alas I have heard that this doesn't work with all browsers. It works on IE 6.0 which is what I have tested with. > so my problem might just be something I'm doing wrong. Probably yes. The class cast exception in your traceback indicates that your jython class doesn't extend the class you think it extends see above. Hope this helps. -- Vennlig hilsen Syver Enstad |
From: Samuele P. <ped...@bl...> - 2002-02-04 22:42:11
|
Hi. > Hi All, > > I intended to have a method in a class that have an overload method. I > have the following code in Test.py: > > class Test: > def __init__(self): > self.autoCommit = 1; > def Commit(self, commit=self.autoCommit): > self.autoCommit = commit; > > When executing it in Jython, I got the following error: > > >>> execfile("Test.py") > Traceback (innermost last): > File "<console>", line 1, in ? > File "Test.py", line 1, in ? > File "Test.py", line 4, in Test > NameError: self > > Basically it complain about the Commit method signature. What's the > correct way of doing this in Jython? Thanks. > The problem you're seeing is because default argument expressions are evaluated at function definition time not each time the function is invoked, so the reference to self in commit= does not make sense. A possible working rewrite is: def Commit(self, commit=None): if commit is None: commit = self.autoCommit self.autoCommit = commit Btw you don't need to terminate statements with ';' It is used to separate simple statements on a same line, not a very usual practice in Python. regards, Samuele Pedroni |
From: Yang W. <yw...@pr...> - 2002-02-04 22:07:27
|
Hi All, I intended to have a method in a class that have an overload method. I have the following code in Test.py: class Test: def __init__(self): self.autoCommit =3D 1; def Commit(self, commit=3Dself.autoCommit): self.autoCommit =3D commit; When executing it in Jython, I got the following error: >>> execfile("Test.py") Traceback (innermost last): File "<console>", line 1, in ? File "Test.py", line 1, in ? File "Test.py", line 4, in Test NameError: self Basically it complain about the Commit method signature. What's the correct way of doing this in Jython? Thanks. Yang |