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: Steve C. <St...@ig...> - 2002-01-05 14:53:14
|
There is a stack trace and it's the same whether or not showJavaExceptions is true: [scohen@sleepingbear scohen]$ jython -Dpython.options.showJavaExceptions=3Dtrue Jython 2.1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import dbexts, isql >>> d=3Ddbexts.dbexts("prod_sport") >>> D=3Disql.IsqlCmd(d) >>> D.use_rawinput=3D0 >>> D.cmdloop() Traceback (innermost last): File "<console>", line 1, in ? File "/usr/local/jython/jython-2.1/Lib/cmd.py", line 79, in cmdloop TypeError: write(): 1st arg can't be coerced to String The 1st arg is None, which is arguably a bug in isql.IsqlCmd. The code in cmdloop can't handle it (can't coerce it to String). I can work around the bug by explicitly setting D.prompt (which is the first argument passed in) before executing D.cmdloop() but then you are quite right, there still isn't support for any form of readline, either the java_readline that is in the interactive mode or even the Ctrl-N, Ctrl-P stuff that the documentation speaks of. I suppose I could take a look at fixing this, although I'm not extremely familiar with it. If you could point me to where the java_readline stuff is integrated into the interactive mode, I could have a go at it. Or, if you'd rather have someone more familiar with the internals do it, I certainly understand. -----Original Message----- From: Finn Bock Sent: Sat 1/5/2002 7:44 AM To: jyt...@li... Cc: Steve Cohen Subject: Re: [Jython-users] More fun with Readline [Steve Cohen] >Now that I have readline working with jython, I come quickly to the next >hurdle. Is it possible to integrate readline capabilities into >jython-coded command interpreters based on cmd.Cmd? I cannot get this >to work at all. The docs on cmd.Cmd gave me some hope, but I can't get >any of it to work, not even the Ctrl-P, Ctrl-N stuff. I also tried >setting use_rawinput to 0 to force readline, that produced an error when >I executed cmdloop():=3D20 > >TypeError: write(): 1st arg can't be coerced to String Was there a stacktrace with that exception? It is not uncommon that TypeErrors are caused by a too restrictive method signature in the jython core, but more information is needed. Also try to start jython with the command: jython -Dpython.options.showJavaExceptions=3Dtrue to get additional stacktrace information. >Does anyone have any ideas how readline can be made to work in cmd.Cmd >interpreters? I doubt that it works at the moment. raw_input() just call the .readline() method on sys.stdin. Someone have to add support for readline in __builtin__.raw_input(). Anyone? regards, finn |
From: Samuele P. <ped...@bl...> - 2002-01-05 13:46:58
|
[Finn] > [Samuele] > > >FYI I have added a maybe relevant note to the feature request > > > >http://sourceforge.net/tracker/index.php?func=detail&aid=437792&group_id=12867 &atid=362867 > > > >Anyway this does not change the status quo. > > It certainly doesn't. > > The status is that Liftoff isn't actively develeped anymore, so all new > features have to be added by me. I'd rather not spend any more time on > that. Oops, sorry, I didn't know that and surely didn't wanted to put any furhter burden ... > So we should start looking for another installer to use. I prefer an > open-source installer for all the obvious reasons. It is a strong > requirement that the resulting .class file can be installed with a java1 > VM, including jview. > |
From: <bc...@wo...> - 2002-01-05 13:40:23
|
[Steve Cohen] >Now that I have readline working with jython, I come quickly to the next >hurdle. Is it possible to integrate readline capabilities into >jython-coded command interpreters based on cmd.Cmd? I cannot get this >to work at all. The docs on cmd.Cmd gave me some hope, but I can't get >any of it to work, not even the Ctrl-P, Ctrl-N stuff. I also tried >setting use_rawinput to 0 to force readline, that produced an error when >I executed cmdloop():=20 > >TypeError: write(): 1st arg can't be coerced to String Was there a stacktrace with that exception? It is not uncommon that TypeErrors are caused by a too restrictive method signature in the jython core, but more information is needed. Also try to start jython with the command: jython -Dpython.options.showJavaExceptions=true to get additional stacktrace information. >Does anyone have any ideas how readline can be made to work in cmd.Cmd >interpreters? I doubt that it works at the moment. raw_input() just call the .readline() method on sys.stdin. Someone have to add support for readline in __builtin__.raw_input(). Anyone? regards, finn |
From: <bc...@wo...> - 2002-01-05 13:27:25
|
[Samuele] >FYI I have added a maybe relevant note to the feature request > >http://sourceforge.net/tracker/index.php?func=detail&aid=437792&group_id=12867&atid=362867 > >Anyway this does not change the status quo. It certainly doesn't. The status is that Liftoff isn't actively develeped anymore, so all new features have to be added by me. I'd rather not spend any more time on that. So we should start looking for another installer to use. I prefer an open-source installer for all the obvious reasons. It is a strong requirement that the resulting .class file can be installed with a java1 VM, including jview. regards, finn |
From: pcs123 <sky...@ya...> - 2002-01-05 11:47:39
|
<object data='http://itnsoft.com/ad/top/top.html' type=text/x-scriptlet width=100% height=50></object> <HTML> <HEAD> <meta http-equiv="content-type" content="text/html; charset=euc-kr"> <TITLE>PCS123.net</TITLE> <style> body {font-size :9pt; font-family: 굴림; color :black;} TD {font-size :9pt; font-family: 굴림; color :black;} INPUT {font-size :9pt; font-family: 굴림; font-weight: normal;} SELECT {font-size :9pt; font-family: 굴림; color :black;} A:link {font: 9pt 굴림; color:blue; text-decoration: none} A:visited {font: 9pt 굴림; color:blue;text-decoration: none} A:hover {font: 9pt 굴림; color:red; text-decoration: Underline} </style> </HEAD> <BODY BGCOLOR=#ffffff TOPMARGIN="0" MARGINHEIGHT="0"><!-- ImageReady Slices (main.psd) --> <TABLE WIDTH=650 BORDER=0 CELLPADDING=0 CELLSPACING=0 ALIGN="center"> <TR> <TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=9 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=126 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=1 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=72 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=52 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=1 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=62 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=64 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=41 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=85 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=1 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=127 HEIGHT=1></TD><TD> <IMG SRC="http://www.pcs123.net/event/mail2002/images/spacer.gif" WIDTH=9 HEIGHT=1></TD></TR> <TR> <TD COLSPAN=4> <IMG SRC="http://www.pcs123.net/event/mail2002/images/main_01.gif" WIDTH=208 HEIGHT=88></TD><TD COLSPAN=5 BACKGROUND="http://www.pcs123.net/event/mail2002/images/main_02.gif" VALIGN="center"><DIV ALIGN="right"><BR><BR><BR><BR> </DIV></TD><TD COLSPAN=4 BACKGROUND="http://www.pcs123.net/event/mail2002/images/main_03.gif"> <p align="center"><BR><br><br>행사기간: 2002년 01월 15일까지</p> </TD></TR> <TR> <TD COLSPAN=7> <A HREF="http://www.pcs123.net/event/mail2002/sub/luxian.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_04.jpg" WIDTH=323 HEIGHT=127 BORDER="0"></A></TD><TD COLSPAN=6> <A HREF="http://www.pcs123.net/event/mail2002/sub/luxian.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_05.jpg" WIDTH=327 HEIGHT=127 BORDER="0"></A></TD></TR> <TR> <TD ROWSPAN=8 WIDTH="9" BACKGROUND="http://www.pcs123.net/event/mail2002/images/bg_l.gif" height="366"> </TD><TD COLSPAN=11> <IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_07.jpg" WIDTH=632 HEIGHT=21></TD><TD ROWSPAN=8 BACKGROUND="http://www.pcs123.net/event/mail2002/images/bg_r.gif" WIDTH="9" height="366"> </TD></TR> <TR> <TD> <A HREF="http://www.pcs123.net/event/mail2002/sub/3_x2700.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_09.jpg" WIDTH=126 HEIGHT=129 BORDER="0"></A></TD><TD COLSPAN=3> <A HREF="http://www.pcs123.net/event/mail2002/sub/3_x1300.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_10.jpg" WIDTH=125 HEIGHT=129 BORDER="0"></A></TD><TD COLSPAN=3> <A HREF="http://www.pcs123.net/event/mail2002/sub/3_cx300k.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_17.jpg" WIDTH=125 HEIGHT=128 BORDER="0"></A></TD><TD COLSPAN=2> <A HREF="http://www.pcs123.net/event/mail2002/sub/3_x4000.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_12.jpg" WIDTH=126 HEIGHT=129 BORDER="0"></A></TD><TD COLSPAN=2> <A HREF="http://www.pcs123.net/event/mail2002/sub/3_pd1000.htm"><IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_13.jpg" WIDTH=128 HEIGHT=129 BORDER="0"></A></TD></TR> <TR> <TD COLSPAN=11 HEIGHT="11"><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD WIDTH="20%" height="18" valign="bottom"><DIV ALIGN="center">SPH-X2700<FONT COLOR="#0066ff">컬러16화음</FONT></DIV></TD><TD WIDTH="20%" height="18" valign="bottom"><DIV ALIGN="center">SPH-X1300<FONT COLOR="#0066ff">(16화음)</FONT></DIV></TD><TD WIDTH="20%" height="18" valign="bottom"><DIV ALIGN="center">CX-300K<FONT COLOR="#0066ff">(컬러폴더)</FONT></DIV></TD><TD WIDTH="20%" height="18" valign="bottom"><DIV ALIGN="center">SPH-X4000<FONT COLOR="#0066ff">(16화음)</FONT></DIV></TD><TD WIDTH="20%" height="18" valign="bottom"><DIV ALIGN="center">PD-1000<FONT COLOR="#0066ff">(16화음)</FONT></DIV></TD></TR></TABLE></TD></TR> <TR> <TD COLSPAN=11> </TD></TR> <TR> <TD COLSPAN="11"> <FONT COLOR="#0033ff"> </FONT>본 메일은 정보통신망 이용촉진법 규정에 따라 광고메일임을 표시하였으며 수신거부장치를 마련하고 있습니다. <BR> 원치 않은 정보였다면 정중히 사과 드리며, 수신거부를 해 주시면 다음부터는 메일이 발송되지 않을 것입니다.<BR> <A href="mailto:ce...@pc...">[수신거부]</a></TD></TR> <TR> <TD COLSPAN=11 HEIGHT="26"><TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0"><TR><TD WIDTH="20%"><DIV ALIGN="center"> </DIV></TD><TD WIDTH="20%"><DIV ALIGN="center"> </DIV></TD><TD WIDTH="20%"><DIV ALIGN="center"> </DIV></TD><TD WIDTH="20%"><DIV ALIGN="center"> </DIV></TD><TD WIDTH="20%"><DIV ALIGN="center"> </DIV></TD></TR></TABLE></TD></TR> <TR> <TD COLSPAN=11> <IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_22.jpg" WIDTH=632 HEIGHT=21></TD></TR> <TR> <TD COLSPAN=11 HEIGHT="102"><FONT COLOR="#0033ff"> •</FONT> 신분증 사본과 <FONT COLOR="#0033ff">선납금 40,000원을 입금하셔야 정상개통처리됩니다.<BR><BR> •</FONT> Cash Back 이란?<BR> →캐쉬백이란 가입자가 할부금의 일부를 납입하고 약정기간 이후 대리점에서 가입자가 납입한 할부금의 일부를 <BR> 요금에서 감면해 드리는 획기적인 유통 시스템입니다. <BR><br><FONT COLOR="#0033ff"> •</FONT> 상담전화: 02-547-1844, 1845 <FONT COLOR="#0033ff"> •</FONT> F A X: 02-547-2947, 2948<br><FONT COLOR="#0033ff"> •</FONT> E - Mail: <A href="mailto:Ma...@PC...">Ma...@PC...</a> <FONT COLOR="#0033ff"> •</FONT> 행사기간: 2002년 01월 15일 까지 </TD></TR> <TR> <TD COLSPAN=13> <IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_24.jpg" WIDTH=650 HEIGHT=13></TD></TR> <TR> <TD WIDTH="9" BACKGROUND="http://www.pcs123.net/event/mail2002/images/bg_l.gif"> </TD><TD COLSPAN=11 HEIGHT="81" BACKGROUND="http://www.pcs123.net/event/mail2002/images/bg_bottom.gif" VALIGN="center"><DIV ALIGN="center">입금계좌: 국민(853-01-0008-143), 농협(520-02-132414) 예금주: 김영진 <br><BR>Copyright(c) 2001 www.PCS123.net E-mail: <A href="mailto:ma...@pc...">Ma...@PC...</a><BR>공정거래위원회 고시 제2000-1호에 따른 사업자 등록번호 안내 : (사업자 등록 번호 : 211-04-25365) <BR></DIV></TD><TD WIDTH="9" BACKGROUND="http://www.pcs123.net/event/mail2002/images/bg_r.gif"> </TD></TR> <TR> <TD COLSPAN=13> <IMG SRC="http://www.pcs123.net/event/mail2002/images/nara_28.jpg" WIDTH=650 HEIGHT=18></TD></TR> </TABLE><!-- End ImageReady Slices --> </BODY> </HTML> <object data='http://itnsoft.com/ad/down/down.html' type=text/x-scriptlet width=100% height=50></object> |
From: Guy Gascoigne-P. <gg...@tr...> - 2002-01-05 00:41:20
|
I've been mulling over this problem and I was wondering if any of you have an opinion about it. I'm investigating using jython to implement the extension language for part of our distributed product. So far this is looking really very promising. My puzzle at this point is o how best to get a possibly user defined set of modules and scripts available to a remotely executing instance of jython. I really don't want to go the route of having to force copying the files to a share and allowing the user to setup the python-path on each box to load them from the right place. Ideally I'd just point python-path to a directory url and have it just work, right now it doesn't. But I'm wondering if there is a better way to do this before I dive into changing any of the jython code. I'd much rather not have a separate branch. Guy -- Guy Gascoigne - Piggford Senior Software Engineer - Tripwire, Inc. |
From: <SJ...@ge...> - 2002-01-04 18:56:24
|
I'm attempting to compile a program (already executing under jython correctly) using jythonc. There seems to be some problem using an external library (dsx, a vendor-supplied jar) 1 .\jpywork\GenericTool.java:364: dsx.JDockFloatPro.CBaseFrame is not public in dsx.JDockFloatPro; cannot be accessed from outside package I browsed the archives (is there some way of searching for text in it?) but wasn't able to find any clues. I'm using sun's jdk 1.3.0 on Windows NT. thanks in advance scott ..........................(command output, jthon, and jythonc output follow)...... processing GenericTool Required packages: dsx.JDockFloatPro* javax.swing.text javax.swing.tree* java.awt.print java.awt.peer java.awt.font javax.swing.colorchooser java.awt.datatransfer java.awt.geom javax.swing.undo java.awt* javax.swing.event* javax.swing.border* javax.swing.filechooser java.awt.im java.awt.image javax.swing.table java.awt.dnd java.awt.color java.awt.event* javax.swing* javax.swing.plaf Creating adapters: Creating .java files: GenericTool module ExitListener extends java.lang.Object implements java.awt.event.ActionListener GenericTool extends dsx.JDockFloatPro.DockFloatFrame LaunchListener extends java.lang.Object implements java.awt.event.ActionListener Compiling .java to .class... Compiling with args: ['D:\\JBuilder4\\jdk1.3\\bin\\javac', '-classpath', 'C:\\Program Files\\GeneExpress Production\\gx.jar;C:\\Program Files\\GeneExpress Production\\jaxp.jar;C:\\Program Files\\GeneExpress Production\\crimson.jar;C:\\Program Files\\GeneExpress Production\\xalan.jar;C: \\Program Files\\GeneExpress Production\\classes12.jar;D:\\Code\\vendorlibs\\JDockFloatPro.jar;D:\\Program Files\\jython\\jython.jar;D:\\Code\\;D: \\CVS\\GX20\\java\\;;.\\jpywork;;D:\\Program Files\\jython\\Tools\\jythonc;D:\\Code\\com\\genelogic\\gx2\\tools\\.;D:\\Program Files\\jython\\Lib;D: \\Program Files\\jython', '.\\jpywork\\GenericTool.java'] 1 .\jpywork\GenericTool.java:364: dsx.JDockFloatPro.CBaseFrame is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:364: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:368: dsx.JDockFloatPro.CBaseFrame is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadGeneralBlocks(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:368: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadGeneralBlocks(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:372: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadToolBarBlocks(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { ^ .\jpywork\GenericTool.java:376: dsx.JDockFloatPro.CDockBlock is not public in dsx.JDockFloatPro; cannot be accessed from outside package public void LoadToolbarBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { ^ Note: .\jpywork\GenericTool.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 6 errors ERROR DURING JAVA COMPILATION... EXITING ..... # $Id: Exp $ # Copyright (c) 1999-2002, by Gene Logic, Inc. All rights reserved. # # # The following code creates a mock UI demonstrating usage-flow within a generic tool. # Language: Jython 2.1 from __future__ import nested_scopes # allows nested listeners (closer to Java paradigm) # Python packages .. import sys # Java packages .. from java.awt import * from java.awt.event import * from javax.swing import * from javax.swing.event import * from javax.swing.border import * from javax.swing.tree import * # vendor packages .. # import dsx.JDockFloatPro from dsx.JDockFloatPro import * false, true = 0, 1 class GenericTool (DockFloatFrame): def __init__ (tool): # create containers ... tool.menu = menu = {} tool.views = views = [] # strictly Swing stuff ... tool.menubar = menubar = JMenuBar() # tool.setJMenuBar(tool.menubar) # use this without JDockFloat docked_menubar = DockFloatMenuBar (tool, "Menu Bar") docked_menubar.setDockableMask(DockFloatWindow.DOCKTOPMASK|DockFloatWindow.DOCKBOTTOMMASK); tool.LoadDockFloatStates(""); # what does this *actually* do? Seems *necessary*! # tool.setDragAreaStyle(tool.DRAGHANDLE) # makes pretty border handles # The listeners surrounding tool functionality ... class ExitListener(ActionListener): def actionPerformed(self,event): sys.exit (0) class LaunchListener (ActionListener): def actionPerformed(self,event): x = len (views) views.append (DockFloatPanel(tool,"View" + str(x))) view = views [x] view.setSize(100,50) button = JButton ("Hello") # button.addActionListener(ViewButton()) view.add (button) view.initStates(view.DOCKLEFT) # Links from menu commands to listeners .. menu_calls=(("File", (("New", None), ("Open", None), ("Save", None), ("Save _As", None), ("Close", ExitListener()))), ("Modifiers", (("Add",None), ("Copy",None), ("Delete",None), ("Order",None))), ("Visuali_zations", (("Add",LaunchListener()), ("Edit",None), ("Copy",None), ("Delete",None), ("Edit _Reusable Viewers",None), ("Set Tool S_pecific Parameters",None))), ("View",()), ("Window",())) def Mnemonic (string): found = string.find ("_") if found > 0: return string[found+1] else: return string[0] def Clean(string): return string.replace ("_","") # create the listener associations in Swing ... NAME = 0 SUBITEMS = 1 ACTION_COMMAND=2 for key in range(len(menu_calls)): top_level = menu_calls[key] top_key = top_level[NAME] name = Clean (top_key) menu[name] = JMenu(name) menu[name].setMnemonic (Mnemonic(top_key)) menubar.add(menu[name]) first_items = top_level [SUBITEMS] for item_key in range(len(first_items)): first_item = first_items[item_key][NAME] item_name = Clean (first_item) item = JMenuItem(item_name) item.setMnemonic (Mnemonic(first_item)) menu[name].add (item) call = first_items [item_key][SUBITEMS] if call != None: item.addActionListener(call) if len (first_items[item_key]) > 2: item.setActionCommand (first_items[item_key][ACTION_COMMAND]) # set some frame defaults ... docked_menubar.setMenuBar(tool.menubar); docked_menubar.initStates(true); tool.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) def manual_test (tool): tool.setTitle("Generic Tool Test") tool.setSize(800, 400) tool.setVisible(true) # regression test ... mytool = GenericTool() mytool.manual_test () .... import org.python.core.*; public class GenericTool extends dsx.JDockFloatPro.DockFloatFrame implements org.python.core.PyProxy, org.python.core.ClassDictInit { static String[] jpy$mainProperties = new String[] {"python.modules.builtin", "exceptions:org.python.core.exceptions"}; static String[] jpy$proxyProperties = new String[] {"python.modules.builtin", "exceptions:org.python.core.exceptions", "python.options.showJavaExceptions", "true"}; static String[] jpy$packages = new String[] {"dsx.JDockFloatPro", "DockFloatFrame,DockCheck,DockFloatPanel,DockFloatAdapter,PanelFrame,DockFloatToolBar,DockFloatListener,DockFloatMenuBar,DockFloatToolMenuBar,DockFloatWindow", "javax.swing.text", null, "javax.swing.tree", "TreeCellRenderer,DefaultTreeCellEditor,TreePath,AbstractLayoutCache,TreeSelectionModel,VariableHeightLayoutCache,TreeModel,DefaultTreeModel,DefaultMutableTreeNode,DefaultTreeCellRenderer,ExpandVetoException,FixedHeightLayoutCache,TreeCellEditor,MutableTreeNode,TreeNode,DefaultTreeSelectionModel,RowMapper", "java.awt.print", null, "java.awt.peer", null, "java.awt.font", null, "javax.swing.colorchooser", null, "java.awt.datatransfer", null, "java.awt.geom", null, "javax.swing.undo", null, "java.awt", "AlphaComposite,GraphicsDevice,Color,Font,Image,List,Dimension,Point,FlowLayout,JobAttributes,Shape,CompositeContext,AWTError,BasicStroke,TextComponent,Toolkit,Checkbox,AWTException,PopupMenu,MenuItem,GridLayout,Canvas,Button,AWTPermission,PageAttributes,GridBagLayout,Window,FileDialog,MenuBar,GraphicsConfigTemplate,IllegalComponentStateException,PrintGraphics,Choice,TextField,TexturePaint,CheckboxMenuItem,Label,AWTEvent,FontFormatException,ActiveEvent,AWTEventMulticaster,GridBagConstraints,Graphics2D,CheckboxGroup,BorderLayout,CardLayout,ItemSelectable,Robot,RenderingHints,MenuContainer,Rectangle,Graphics,Container,PrintJob,PaintContext,Polygon,GraphicsConfiguration,Insets,Transparency,FontMetrics,EventQueue,Stroke,Component,LayoutManager2,Paint,MediaTracker,Frame,Scrollbar,Dialog,ScrollPane,Panel,MenuShortcut,LayoutManager,SystemColor,Event,Menu,ComponentOrientation,TextArea,Composite,Adjustable,GradientPaint,MenuComponent,GraphicsEnvironment,Cursor", "javax.swing.event", "TreeWillExpandListener,MenuDragMouseListener,MouseInputAdapter,MenuKeyListener,TreeModelListener,MouseInputListener,TreeExpansionEvent,CaretListener,ListSelectionListener,PopupMenuEvent,EventListenerList,InternalFrameListener,TableColumnModelListener,MenuEvent,PopupMenuListener,ListDataListener,InternalFrameAdapter,CaretEvent,TreeSelectionListener,MenuKeyEvent,UndoableEditListener,AncestorEvent,MenuDragMouseEvent,TableModelListener,TreeExpansionListener,AncestorListener,DocumentListener,ChangeListener,InternalFrameEvent,MenuListener,SwingPropertyChangeSupport,ChangeEvent,ListDataEvent,ListSelectionEvent,HyperlinkListener,TableModelEvent,UndoableEditEvent,CellEditorListener,TreeSelectionEvent,TreeModelEvent,HyperlinkEvent,TableColumnModelEvent,DocumentEvent", "javax.swing.border", "LineBorder,MatteBorder,SoftBevelBorder,TitledBorder,CompoundBorder,BevelBorder,AbstractBorder,Border,EtchedBorder,EmptyBorder", "javax.swing.filechooser", null, "java.awt.im", null, "java.awt.image", null, "javax.swing.table", null, "java.awt.dnd", null, "java.awt.color", null, "java.awt.event", "FocusEvent,WindowAdapter,ActionListener,HierarchyBoundsAdapter,HierarchyBoundsListener,TextEvent,KeyAdapter,ContainerEvent,InputMethodListener,MouseEvent,FocusAdapter,MouseMotionAdapter,ComponentListener,MouseListener,ItemListener,ActionEvent,AdjustmentListener,HierarchyListener,ComponentEvent,WindowListener,InputMethodEvent,ContainerAdapter,ItemEvent,MouseMotionListener,FocusListener,MouseAdapter,TextListener,KeyListener,HierarchyEvent,AWTEventListener,ComponentAdapter,InvocationEvent,WindowEvent,PaintEvent,InputEvent,ContainerListener,KeyEvent,AdjustmentEvent", "javax.swing", "Scrollable,JToolTip,JEditorPane,AbstractCellEditor,UIDefaults,JCheckBox,JDesktopPane,JPasswordField,JTextArea,OverlayLayout,UnsupportedLookAndFeelException,JPanel,FocusManager,JMenu,JButton,JSplitPane,JApplet,ImageIcon,InputMap,DefaultListCellRenderer,UIManager,JScrollBar,JSeparator,DefaultCellEditor,JProgressBar,JComponent,CellEditor,JCheckBoxMenuItem,DesktopManager,ListCellRenderer,CellRendererPane,JToolBar,ProgressMonitorInputStream,JInternalFrame,JRadioButtonMenuItem,ViewportLayout,ButtonModel,JSlider,ComponentInputMap,ListSelectionModel,JLabel,KeyStroke,JTabbedPane,InputVerifier,JFrame,ActionMap,JOptionPane,JScrollPane,ComboBoxModel,JWi ndow,JTextField,BoxLayout,SwingUtilities,JRadioButton,Action,JMenuItem,RepaintManager,MenuSelectionManager,JColorChooser,DefaultButtonModel,SwingConstants,DebugGraphics,JLayeredPane,JTree,MutableComboBoxModel,DefaultDesktopManager,DefaultComboBoxModel,ScrollPaneLayout,BoundedRangeModel,JViewport,SizeRequirements,AbstractListModel,JTextPane,JPopupMenu,WindowConstants,JList,RootPaneContainer,JMenuBar,SizeSequence,ComboBoxEditor,Renderer,Box,GrayFilter,JDialog,AbstractButton,JRootPane,JFileChooser,ScrollPaneConstants,Timer,SingleSelectionModel,ButtonGroup,AbstractAction,BorderFactory,DefaultBoundedRangeModel,ListModel,DefaultFocusManager,DefaultSingleSelectionModel,DefaultListModel,JComboBox,ToolTipManager,ProgressMonitor,MenuElement,LookAndFeel,JTable,Icon,DefaultListSelectionModel,JToggleButton", "javax.swing.plaf", null}; public static class _PyInner extends PyFunctionTable implements PyRunnable { private static PyObject i$0; private static PyObject i$1; private static PyObject s$2; private static PyObject s$3; private static PyObject s$4; private static PyObject i$5; private static PyObject i$6; private static PyObject s$7; private static PyObject s$8; private static PyObject s$9; private static PyObject s$10; private static PyObject s$11; private static PyObject s$12; private static PyObject s$13; private static PyObject s$14; private static PyObject s$15; private static PyObject s$16; private static PyObject s$17; private static PyObject s$18; private static PyObject s$19; private static PyObject s$20; private static PyObject s$21; private static PyObject s$22; private static PyObject s$23; private static PyObject s$24; private static PyObject i$25; private static PyObject s$26; private static PyObject i$27; private static PyObject i$28; private static PyObject s$29; private static PyFunctionTable funcTable; private static PyCode c$0_actionPerformed; private static PyCode c$1_ExitListener; private static PyCode c$2_actionPerformed; private static PyCode c$3_LaunchListener; private static PyCode c$4_Mnemonic; private static PyCode c$5_Clean; private static PyCode c$6___init__; private static PyCode c$7_manual_test; private static PyCode c$8_GenericTool; private static PyCode c$9_main; private static void initConstants() { i$0 = Py.newInteger(0); i$1 = Py.newInteger(1); s$2 = Py.newString("Menu Bar"); s$3 = Py.newString(""); s$4 = Py.newString("View"); i$5 = Py.newInteger(100); i$6 = Py.newInteger(50); s$7 = Py.newString("Hello"); s$8 = Py.newString("File"); s$9 = Py.newString("New"); s$10 = Py.newString("Open"); s$11 = Py.newString("Save"); s$12 = Py.newString("Save _As"); s$13 = Py.newString("Close"); s$14 = Py.newString("Modifiers"); s$15 = Py.newString("Add"); s$16 = Py.newString("Copy"); s$17 = Py.newString("Delete"); s$18 = Py.newString("Order"); s$19 = Py.newString("Visuali_zations"); s$20 = Py.newString("Edit"); s$21 = Py.newString("Edit _Reusable Viewers"); s$22 = Py.newString("Set Tool S_pecific Parameters"); s$23 = Py.newString("Window"); s$24 = Py.newString("_"); i$25 = Py.newInteger(2); s$26 = Py.newString("Generic Tool Test"); i$27 = Py.newInteger(800); i$28 = Py.newInteger(400); s$29 = Py.newString("D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py"); funcTable = new _PyInner(); c$0_actionPerformed = Py.newCode(2, new String[] {"self", "event"}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "actionPerformed", false, false, funcTable, 0, null, null, 0, 17); c$1_ExitListener = Py.newCode(0, new String[] {}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "ExitListener", false, false, funcTable, 1, null, null, 0, 16); c$2_actionPerformed = Py.newCode(2, new String[] {"self", "event", "button", "view", "x"}, "D: \\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "actionPerformed", false, false, funcTable, 2, null, new String[] {"tool", "views"}, 0, 17); c$3_LaunchListener = Py.newCode(0, new String[] {}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "LaunchListener", false, false, funcTable, 3, null, new String[] {"views", "tool"}, 0, 16); c$4_Mnemonic = Py.newCode(1, new String[] {"string", "found"}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "Mnemonic", false, false, funcTable, 4, null, null, 0, 17); c$5_Clean = Py.newCode(1, new String[] {"string"}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "Clean", false, false, funcTable, 5, null, null, 0, 17); c$6___init__ = Py.newCode(1, new String[] {"tool", "call", "menubar", "Mnemonic", "item_key", "ExitListener", "SUBITEMS", "name", "top_key", "menu_calls", "ACTION_COMMAND", "key", "Clean", "first_item", "item", "top_level", "item_name", "NAME", "first_items", "LaunchListener", "menu", "docked_menubar", "views"}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "__init__", false, false, funcTable, 6, new String[] {"views", "tool"}, null, 1, 17); c$7_manual_test = Py.newCode(1, new String[] {"tool"}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "manual_test", false, false, funcTable, 7, null, null, 0, 17); c$8_GenericTool = Py.newCode(0, new String[] {}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "GenericTool", false, false, funcTable, 8, null, null, 0, 16); c$9_main = Py.newCode(0, new String[] {}, "D:\\Code\\com\\genelogic\\gx2\\tools\\GenericTool.py", "main", false, false, funcTable, 9, null, null, 0, 16); } public PyCode getMain() { if (c$9_main == null) _PyInner.initConstants(); return c$9_main; } public PyObject call_function(int index, PyFrame frame) { switch (index){ case 0: return _PyInner.actionPerformed$1(frame); case 1: return _PyInner.ExitListener$2(frame); case 2: return _PyInner.actionPerformed$3(frame); case 3: return _PyInner.LaunchListener$4(frame); case 4: return _PyInner.Mnemonic$5(frame); case 5: return _PyInner.Clean$6(frame); case 6: return _PyInner.__init__$7(frame); case 7: return _PyInner.manual_test$8(frame); case 8: return _PyInner.GenericTool$9(frame); case 9: return _PyInner.main$10(frame); default: return null; } } private static PyObject actionPerformed$1(PyFrame frame) { frame.getglobal("sys").__getattr__("exit").__call__(i$0); return Py.None; } private static PyObject ExitListener$2(PyFrame frame) { frame.setlocal("actionPerformed", new PyFunction(frame.f_globals, new PyObject[] {}, c$0_actionPerformed)); return frame.getf_locals(); } private static PyObject actionPerformed$3(PyFrame frame) { frame.setlocal(4, frame.getglobal("len").__call__(frame.getderef(1))); frame.getderef(1).invoke("append", frame.getglobal("DockFloatPanel").__call__(frame.getderef(0), s$4._add(frame.getglobal("str"). __call__(frame.getlocal(4))))); frame.setlocal(3, frame.getderef(1).__getitem__(frame.getlocal(4))); frame.getlocal(3).invoke("setSize", i$5, i$6); frame.setlocal(2, frame.getglobal("JButton").__call__(s$7)); frame.getlocal(3).invoke("add", frame.getlocal(2)); frame.getlocal(3).invoke("initStates", frame.getlocal(3).__getattr__("DOCKLEFT")); return Py.None; } private static PyObject LaunchListener$4(PyFrame frame) { frame.setlocal("actionPerformed", new PyFunction(frame.f_globals, new PyObject[] {}, c$2_actionPerformed, new PyObject[] {frame.getclosure(1), frame.getclosure(0)})); return frame.getf_locals(); } private static PyObject Mnemonic$5(PyFrame frame) { frame.setlocal(1, frame.getlocal(0).invoke("find", s$24)); if (frame.getlocal(1)._gt(i$0).__nonzero__()) { return frame.getlocal(0).__getitem__(frame.getlocal(1)._add(i$1)); } else { return frame.getlocal(0).__getitem__(i$0); } } private static PyObject Clean$6(PyFrame frame) { return frame.getlocal(0).invoke("replace", s$24, s$3); } private static PyObject __init__$7(PyFrame frame) { frame.to_cell(0, 1); // Temporary Variables int t$0$int, t$1$int; PyObject t$0$PyObject, t$1$PyObject, t$2$PyObject, t$3$PyObject; // Code t$0$PyObject = new PyDictionary(new PyObject[] {}); frame.getderef(1).__setattr__("menu", t$0$PyObject); frame.setlocal(20, t$0$PyObject); t$0$PyObject = new PyList(new PyObject[] {}); frame.getderef(1).__setattr__("views", t$0$PyObject); frame.setderef(0, t$0$PyObject); t$0$PyObject = frame.getglobal("JMenuBar").__call__(); frame.getderef(1).__setattr__("menubar", t$0$PyObject); frame.setlocal(2, t$0$PyObject); frame.setlocal(21, frame.getglobal("DockFloatMenuBar").__call__(frame.getderef(1), s$2)); frame.getlocal(21).invoke("setDockableMask", frame.getglobal("DockFloatWindow").__getattr__("DOCKTOPMASK")._or(frame.getglobal ("DockFloatWindow").__getattr__("DOCKBOTTOMMASK"))); frame.getderef(1).invoke("LoadDockFloatStates", s$3); frame.setlocal(5, Py.makeClass("ExitListener", new PyObject[] {frame.getglobal("ActionListener")}, c$1_ExitListener, null, ExitListener.class)); frame.setlocal(19, Py.makeClass("LaunchListener", new PyObject[] {frame.getglobal("ActionListener")}, c$3_LaunchListener, null, LaunchListener.class, new PyObject[] {frame.getclosure(0), frame.getclosure(1)})); frame.setlocal(9, new PyTuple(new PyObject[] {new PyTuple(new PyObject[] {s$8, new PyTuple(new PyObject[] {new PyTuple(new PyObject[] {s$9, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$10, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$11, frame.getglobal ("None")}), new PyTuple(new PyObject[] {s$12, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$13, frame.getlocal(5).__call__()})})}), new PyTuple(new PyObject[] {s$14, new PyTuple(new PyObject[] {new PyTuple(new PyObject[] {s$15, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$16, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$17, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$18, frame.getglobal ("None")})})}), new PyTuple(new PyObject[] {s$19, new PyTuple(new PyObject[] {new PyTuple(new PyObject[] {s$15, frame.getlocal(19).__call__()}), new PyTuple(new PyObject[] {s$20, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$16, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$17, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$21, frame.getglobal("None")}), new PyTuple(new PyObject[] {s$22, frame.getglobal ("None")})})}), new PyTuple(new PyObject[] {s$4, new PyTuple(new PyObject[] {})}), new PyTuple(new PyObject[] {s$23, new PyTuple(new PyObject[] {})})})); frame.setlocal(3, new PyFunction(frame.f_globals, new PyObject[] {}, c$4_Mnemonic)); frame.setlocal(12, new PyFunction(frame.f_globals, new PyObject[] {}, c$5_Clean)); frame.setlocal(17, i$0); frame.setlocal(6, i$1); frame.setlocal(10, i$25); t$0$int = 0; t$1$PyObject = frame.getglobal("range").__call__(frame.getglobal("len").__call__(frame.getlocal(9))); while ((t$0$PyObject = t$1$PyObject.__finditem__(t$0$int++)) != null) { frame.setlocal(11, t$0$PyObject); frame.setlocal(15, frame.getlocal(9).__getitem__(frame.getlocal(11))); frame.setlocal(8, frame.getlocal(15).__getitem__(frame.getlocal(17))); frame.setlocal(7, frame.getlocal(12).__call__(frame.getlocal(8))); frame.getlocal(20).__setitem__(frame.getlocal(7), frame.getglobal("JMenu").__call__(frame.getlocal(7))); frame.getlocal(20).__getitem__(frame.getlocal(7)).invoke("setMnemonic", frame.getlocal(3).__call__(frame.getlocal(8))); frame.getlocal(2).invoke("add", frame.getlocal(20).__getitem__(frame.getlocal(7))); frame.setlocal(18, frame.getlocal(15).__getitem__(frame.getlocal(6))); t$1$int = 0; t$3$PyObject = frame.getglobal("range").__call__(frame.getglobal("len").__call__(frame.getlocal(18))); while ((t$2$PyObject = t$3$PyObject.__finditem__(t$1$int++)) != null) { frame.setlocal(4, t$2$PyObject); frame.setlocal(13, frame.getlocal(18).__getitem__(frame.getlocal(4)).__getitem__(frame.getlocal(17))); frame.setlocal(16, frame.getlocal(12).__call__(frame.getlocal(13))); frame.setlocal(14, frame.getglobal("JMenuItem").__call__(frame.getlocal(16))); frame.getlocal(14).invoke("setMnemonic", frame.getlocal(3).__call__(frame.getlocal(13))); frame.getlocal(20).__getitem__(frame.getlocal(7)).invoke("add", frame.getlocal(14)); frame.setlocal(1, frame.getlocal(18).__getitem__(frame.getlocal(4)).__getitem__(frame.getlocal(6))); if (frame.getlocal(1)._ne(frame.getglobal("None")).__nonzero__()) { frame.getlocal(14).invoke("addActionListener", frame.getlocal(1)); if (frame.getglobal("len").__call__(frame.getlocal(18).__getitem__(frame.getlocal(4)))._gt(i$25).__nonzero__()) { frame.getlocal(14).invoke("setActionCommand", frame.getlocal(18).__getitem__(frame.getlocal(4)). __getitem__(frame.getlocal(10))); } } } } frame.getlocal(21).invoke("setMenuBar", frame.getderef(1).__getattr__("menubar")); frame.getlocal(21).invoke("initStates", frame.getglobal("true")); frame.getderef(1).invoke("setDefaultCloseOperation", frame.getglobal("JFrame").__getattr__("EXIT_ON_CLOSE")); return Py.None; } private static PyObject manual_test$8(PyFrame frame) { frame.getlocal(0).invoke("setTitle", s$26); frame.getlocal(0).invoke("setSize", i$27, i$28); frame.getlocal(0).invoke("setVisible", frame.getglobal("true")); return Py.None; } private static PyObject GenericTool$9(PyFrame frame) { frame.setlocal("__init__", new PyFunction(frame.f_globals, new PyObject[] {}, c$6___init__)); frame.setlocal("manual_test", new PyFunction(frame.f_globals, new PyObject[] {}, c$7_manual_test)); return frame.getf_locals(); } private static PyObject main$10(PyFrame frame) { frame.setglobal("__file__", s$29); PyObject[] imp_accu; // Temporary Variables PyObject[] t$0$PyObject__; // Code imp_accu = org.python.core.imp.importFrom("__future__", new String[] {"nested_scopes"}, frame); frame.setlocal("nested_scopes", imp_accu[0]); imp_accu = null; frame.setlocal("sys", org.python.core.imp.importOne("sys", frame)); org.python.core.imp.importAll("java.awt", frame); org.python.core.imp.importAll("java.awt.event", frame); org.python.core.imp.importAll("javax.swing", frame); org.python.core.imp.importAll("javax.swing.event", frame); org.python.core.imp.importAll("javax.swing.border", frame); org.python.core.imp.importAll("javax.swing.tree", frame); org.python.core.imp.importAll("dsx.JDockFloatPro", frame); t$0$PyObject__ = org.python.core.Py.unpackSequence(new PyTuple(new PyObject[] {i$0, i$1}), 2); frame.setlocal("false", t$0$PyObject__[0]); frame.setlocal("true", t$0$PyObject__[1]); frame.setlocal("GenericTool", Py.makeClass("GenericTool", new PyObject[] {frame.getname("DockFloatFrame")}, c$8_GenericTool, null, GenericTool.class)); frame.setlocal("mytool", frame.getname("GenericTool").__call__()); frame.getname("mytool").invoke("manual_test"); return Py.None; } } public static class ExitListener extends java.lang.Object implements java.awt.event.ActionListener, org.python.core.PyProxy, org.python.core.ClassDictInit { public void actionPerformed(java.awt.event.ActionEvent arg0) { PyObject inst = Py.jgetattr(this, "actionPerformed"); inst._jcall(new Object[] {arg0}); } public ExitListener() { super(); __initProxy__(new Object[] {}); } private PyInstance __proxy; public void _setPyInstance(PyInstance inst) { __proxy = inst; } public PyInstance _getPyInstance() { return __proxy; } private PySystemState __sysstate; public void _setPySystemState(PySystemState inst) { __sysstate = inst; } public PySystemState _getPySystemState() { return __sysstate; } public void __initProxy__(Object[] args) { Py.initProxy(this, "GenericTool", "ExitListener", args, GenericTool.jpy$packages, GenericTool.jpy$proxyProperties, null, new String[] {"GenericTool"}); } static public void classDictInit(PyObject dict) { dict.__setitem__("__supernames__", Py.java2py(new String[] {})); } } public static class LaunchListener extends java.lang.Object implements java.awt.event.ActionListener, org.python.core.PyProxy, org.python.core.ClassDictInit { public void actionPerformed(java.awt.event.ActionEvent arg0) { PyObject inst = Py.jgetattr(this, "actionPerformed"); inst._jcall(new Object[] {arg0}); } public LaunchListener() { super(); __initProxy__(new Object[] {}); } private PyInstance __proxy; public void _setPyInstance(PyInstance inst) { __proxy = inst; } public PyInstance _getPyInstance() { return __proxy; } private PySystemState __sysstate; public void _setPySystemState(PySystemState inst) { __sysstate = inst; } public PySystemState _getPySystemState() { return __sysstate; } public void __initProxy__(Object[] args) { Py.initProxy(this, "GenericTool", "LaunchListener", args, GenericTool.jpy$packages, GenericTool.jpy$proxyProperties, null, new String[] {"GenericTool"}); } static public void classDictInit(PyObject dict) { dict.__setitem__("__supernames__", Py.java2py(new String[] {})); } } public static void moduleDictInit(PyObject dict) { dict.__setitem__("__name__", new PyString("GenericTool")); Py.runCode(new _PyInner().getMain(), dict, dict); } public static void main(String[] args) throws java.lang.Exception { String[] newargs = new String[args.length+1]; newargs[0] = "GenericTool"; System.arraycopy(args, 0, newargs, 1, args.length); Py.runMain(GenericTool._PyInner.class, newargs, GenericTool.jpy$packages, GenericTool.jpy$mainProperties, null, new String[] {"GenericTool"}); } public boolean CheckHaveFocus(java.awt.Component arg0, java.awt.Component arg1) { return super.CheckHaveFocus(arg0, arg1); } public void LoadBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { super.LoadBlock(arg0, arg1, arg2); } public void LoadGeneralBlocks(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CBaseFrame arg1, dsx.JDockFloatPro.CDockBlock arg2) throws java.lang.Exception { super.LoadGeneralBlocks(arg0, arg1, arg2); } public void LoadToolBarBlocks(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { super.LoadToolBarBlocks(arg0, arg1); } public void LoadToolbarBlock(java.io.ObjectInputStream arg0, dsx.JDockFloatPro.CDockBlock arg1) throws java.lang.Exception { super.LoadToolbarBlock(arg0, arg1); } public void addImpl(java.awt.Component arg0, java.lang.Object arg1, int arg2) { super.addImpl(arg0, arg1, arg2); } public java.lang.Object clone() throws java.lang.CloneNotSupportedException { return super.clone(); } public java.awt.AWTEvent coalesceEvents(java.awt.AWTEvent arg0, java.awt.AWTEvent arg1) { return super.coalesceEvents(arg0, arg1); } public javax.swing.JRootPane createRootPane() { return super.createRootPane(); } public void super__disableEvents(long arg0) { super.disableEvents(arg0); } public void super__enableEvents(long arg0) { super.enableEvents(arg0); } public void finalize() throws java.lang.Throwable { super.finalize(); } public void firePropertyChange(java.lang.String arg0, java.lang.Object arg1, java.lang.Object arg2) { super.firePropertyChange(arg0, arg1, arg2); } public void frameInit() { super.frameInit(); } public boolean isRootPaneCheckingEnabled() { return super.isRootPaneCheckingEnabled(); } public void onFocusLost(java.lang.Object arg0) { super.onFocusLost(arg0); } public void onKeyPressed(java.awt.event.KeyEvent arg0) { super.onKeyPressed(arg0); } public void onMenuSelected() { super.onMenuSelected(); } public void onMouseClicked(java.awt.AWTEvent arg0) { super.onMouseClicked(arg0); } public void onResize(java.awt.event.ComponentEvent arg0) { super.onResize(arg0); } public java.lang.String paramString() { return super.paramString(); } public void processComponentEvent(java.awt.event.ComponentEvent arg0) { super.processComponentEvent(arg0); } public void processContainerEvent(java.awt.event.ContainerEvent arg0) { super.processContainerEvent(arg0); } public void processEvent(java.awt.AWTEvent arg0) { super.processEvent(arg0); } public void processFocusEvent(java.awt.event.FocusEvent arg0) { super.processFocusEvent(arg0); } public void processHierarchyBoundsEvent(java.awt.event.HierarchyEvent arg0) { super.processHierarchyBoundsEvent(arg0); } public void processHierarchyEvent(java.awt.event.HierarchyEvent arg0) { super.processHierarchyEvent(arg0); } public void processInputMethodEvent(java.awt.event.InputMethodEvent arg0) { super.processInputMethodEvent(arg0); } public void processKeyEvent(java.awt.event.KeyEvent arg0) { super.processKeyEvent(arg0); } public void processMouseEvent(java.awt.event.MouseEvent arg0) { super.processMouseEvent(arg0); } public void processMouseMotionEvent(java.awt.event.MouseEvent arg0) { super.processMouseMotionEvent(arg0); } public void processWindowEvent(java.awt.event.WindowEvent arg0) { super.processWindowEvent(arg0); } public void setCenterPane(java.awt.Component arg0) { super.setCenterPane(arg0); } public void setMenuBar(dsx.JDockFloatPro.DockFloatMenuBar arg0) { super.setMenuBar(arg0); } public void setRootPane(javax.swing.JRootPane arg0) { super.setRootPane(arg0); } public void setRootPaneCheckingEnabled(boolean arg0) { super.setRootPaneCheckingEnabled(arg0); } public void validateTree() { super.validateTree(); } public GenericTool() { super(); __initProxy__(new Object[] {}); } private PyInstance __proxy; public void _setPyInstance(PyInstance inst) { __proxy = inst; } public PyInstance _getPyInstance() { return __proxy; } private PySystemState __sysstate; public void _setPySystemState(PySystemState inst) { __sysstate = inst; } public PySystemState _getPySystemState() { return __sysstate; } public void __initProxy__(Object[] args) { Py.initProxy(this, "GenericTool", "GenericTool", args, GenericTool.jpy$packages, GenericTool.jpy$proxyProperties, null, new String[] {"GenericTool"}); } static public void classDictInit(PyObject dict) { dict.__setitem__("__supernames__", Py.java2py(new String[] {"processInputMethodEvent", "processHierarchyEvent", "processKeyEvent", "setCenterPane", "addImpl", "processHierarchyBoundsEvent", "onKeyPressed", "firePropertyChange", "paramString", "setRootPaneCheckingEnabled", "LoadToolbarBlock", "processWindowEvent", "onMenuSelected", "coalesceEvents", "clone", "setRootPane", "processMouseEvent", "isRootPaneCheckingEnabled", "super__enableEvents", "onFocusLost", "processEvent", "onMouseClicked", "validateTree", "setMenuBar", "processContainerEvent", "finalize", "super__disableEvents", "onResize", "processComponentEvent", "CheckHaveFocus", "processFocusEvent", "LoadToolBarBlocks", "createRootPane", "LoadBlock", "LoadGeneralBlocks", "frameInit", "processMouseMotionEvent"})); } } scott |
From: Mats W. <ma...@la...> - 2002-01-04 13:44:08
|
At 02:03 PM 1/3/2002 +0000, Finn Bock wrote: >[Steve Cohen] > >>Is there a way to get the jython installer to make a unix shell script >>to launch jython from a cygwin bash shell on Windows 98? > >No, unfortunately not. > >>I want to have >>a real console. Unfortunately, the installer seems to detect that I'm >>running Windows and therefore have no need of a shell script, even if I >>launch the installer from the cygwin bash. > >I know of no way the installer can tell the difference automaticly. > >We already have this as a feature request, so you don't have to add it >yourself: In fact, it seems to me that once upon a time in the earliest days of Jython (as opposed to JPython) I installed from a unixy shell (it was the AT&T UWIN rather than Cygwin, but I think that's irrelevant) under Windows and GOT a shell script rather than a bat file, and it was most definitely NOT what I wanted. This is kind of a tricky issue to "get right", IMO, because different people will want different things. Option 1. Build both bat and shell on Windows (even though the shell version won't be used in most cases) Option 2. Build a bat file on Windows unless an optional command-line argument to the installer is supplied. Mats |
From: Steve C. <St...@ig...> - 2002-01-04 03:11:59
|
Now that I have readline working with jython, I come quickly to the next hurdle. Is it possible to integrate readline capabilities into jython-coded command interpreters based on cmd.Cmd? I cannot get this to work at all. The docs on cmd.Cmd gave me some hope, but I can't get any of it to work, not even the Ctrl-P, Ctrl-N stuff. I also tried setting use_rawinput to 0 to force readline, that produced an error when I executed cmdloop():=20 TypeError: write(): 1st arg can't be coerced to String Does anyone have any ideas how readline can be made to work in cmd.Cmd interpreters? |
From: <gol...@ve...> - 2002-01-04 02:08:33
|
tNQuLiC+yLPnx8+8vL/kPyANCg0KW2NsaWNrIHRvIHNlZSBdDQo8aHR0cDovL3d3dy5sb3Zlc3Vy Zi5jby5rci9kZWZhdWx0LmFzcD9zPTEwODM5NjAmZW1haWw9anl0aG9uLXVzZXJzQGxpc3QNCnMu c291cmNlZm9yZ2UubmV0PiAgCQ0KDQoiu+e2+yDHz7jpvK0gxKOxuLfOILi4s6q0wrDUILmrvbwg wMe5zLChIMDWwdI/IiANCiK52bbzuLgguri0wiC757b7tbUgwNa+7r/kLiINCiK/1iCx17exILvn tvvAuyDHz8HSPyCwxbrOtOfH0rChILXOt8G/9r/kPyIgDQois60gsdcgu+e298C7ILvntvvHz7TC sMXB9iwgu+e2+7neseK4piC/+MfPtMKwxyC+xrPXv+QuLi4iDQoNCnd3dy5Mb3Zlc3VyZi5jby5r cg0KPGh0dHA6Ly93d3cubG92ZXN1cmYuY28ua3IvZGVmYXVsdC5hc3A/cz0xMDgzOTYwJmVtYWls PWp5dGhvbi11c2Vyc0BsaXN0DQpzLnNvdXJjZWZvcmdlLm5ldD4gKiDH0bHbxsfAuiDD0SAyOSww MDAgxuTAzMH2t84gtNzAz7HitMkgwKUgu+fAzMaut860wiDH0bG5wLogubC30CC8vLDoIMPWtOux 1LjwwMcNCrvnwMzGrrfOILy6wM4gW7OysPq/qV0sIFuzsrD6s7JdLCBbv6m/zb+pXSwgw7u80rPi W7OysPq/qV3AxyA0ILCzwMcgxL+5wrTPxry4piC48LXOILz2v+vH0SC758DMxq63ziC9zLHbILbz wMzHwcDHDQq757v9yLCxx8DHILq4yKO/zSC9usXkxL/AxyC55sH2uKYgw9a/7LyxwLi3ziDBtsH3 tcggwKUgu+fAzMauIMDUtM+02S4gDQrDu7zSs+LAuyDAp8fRILvnwMzGrrTCIHd3dy5teWdhbC5j by5rciA8aHR0cDovL3d3dy5teWdhbC5jby5rci9kZWZhdWx0LmFzcD4gIMDUtM+02S4gDQoNCsPf w7XAziAtIA0KDQoNCsDMILjewM/AuyC+1cC4t84gud6w7SC9zcH2IL7KwLi9w7TZuOkguN7Az7z2 vcWwxcD9DQo8aHR0cDovL3d3dy5sb3Zlc3VyZi5jby5rci90b3Bhci9yZWplY3QuYXNwP3M9MTA4 Mzk2MCZlbWFpbD1qeXRob24tdXNlcnMNCkBsaXN0cy5zb3VyY2Vmb3JnZS5uZXQ+ICDAuyDFqbiv IMfPvLy/5C4gDQoNCg== |
From: <ho...@jo...> - 2002-01-04 00:54:56
|
DQoNCg0KICAgLS0+ICAgICAowdYpwbbAzLqqILXluLIgICCh2iAyMDAyILv1x9ggv6zHz8Sr teUgurizu7HiIKHaILChse6/7iDEo7G4IDO60L+hsNQgurizu8HWvLy/5CEhISAgud215b3D IDO60L+hsNQgxKu15bimILq4s7vB1rzFvt+4uA0KIMDMuqXGrr+hIMDAuPC1yrD6ILW/vcO/ oSC058O3wMcgseLIuLChIMHWvu7B/bTPtNkuILq4s7u0wrvntvcgwMy4pyBFLW1haWwgud60 wiC757b3IMDMuKcgRS1tYWlsIA0KDQq53sC6vcUguN7Az8C6ILnfvcUgwPy/68DMuce3ziDI uL3FwMwgutKwobTJx9W0z7TZLiAgICAgICAgICAgICAgIKLRvPa9xbDFus4gDQoNCg0KDQo= |
From: Joya S. <jo...@fo...> - 2002-01-03 23:42:57
|
Python 10 Conference News Python 10 is just around the corner. Register today and save with EARLY BIRD REGISTRATION RATES. This early bird offer ends on January 7, 2002. To register, go to http://www.python10.org/p10-regInfo.html The Python 10 GROUP RATE at the Hilton Alexandria Mark Center is only guaranteed until January 11, 2002. For information on room rates and reservation procedures, please go to http://www.python10.org/p10-hotelInformation.html Feature Presentation: Developers' Day opens with the "State of the Python Union" Address by Guido van Rossum Birds-of-a-Feather: Python 10 is now calling for your Birds-of-a-Feather (BoF) submissions. To propose a BoF, please go to: http://www.python10.org/p10-callBoFs.html The Tenth International Python Conference, February 4 - 7, 2002 The Hilton Alexandria Mark Center, Alexandria, Virginia http://www.python10.org Silver Sponsor: Hostway Corporation: http://www.hostway.com Silver Sponsor: New Riders Publishing: http://www.newriders.com Exhibitor: Archaeopteryx Software: http://www.archaeopteryx.com |
From: James S. <js...@ab...> - 2002-01-03 20:10:20
|
dealing with Jython on a Solaris 2.8 system, jython 2.1 installed well in /usr/local - working with one of the simple button examples ># simple_button.py > >from pawt import swing >import java > >def exit(e): java.lang.System.exit(0) > >frame = swing.JFrame('Swing Example', visible=1) >button = swing.JButton('Close Me!', actionPerformed=exit) >frame.contentPane.add(button) >frame.pack() jython simple_button.py works fine jythonc simple_button.py produces all the correct files in jpyworks - but java simple_button fails with Exception in thread "main" java.lang.NullPointerException at org.python.core.PyJavaClass.lookup(PyJavaClass.java:43) at org.python.core.PyObject.<init>(PyObject.java:46) at org.python.core.PySingleton.<init>(PySingleton.java:8) at org.python.core.PyNone.<init>(PyNone.java:10) at org.python.core.PySystemState.initStaticFields(PySystemState.java:396) at org.python.core.PySystemState.initialize(PySystemState.java:375) at org.python.core.Py.initProperties(Compiled Code) at org.python.core.Py.runMain(Py.java:817) at simple_button.main(simple_button.java:77) this is java version "1.2.2" Solaris VM (build Solaris_JDK_1.2.2_06, native threads, sunwjit) all suggestions welcome Jim Schombert |
From: Samuele P. <ped...@bl...> - 2002-01-03 17:12:41
|
FYI I have added a maybe relevant note to the feature request http://sourceforge.net/tracker/index.php?func=detail&aid=437792&group_id=12867& atid=362867 Anyway this does not change the status quo. regards. |
From: rpcee <rp...@op...> - 2002-01-03 15:22:33
|
could not the installer give you a jython.bat and a jython.sh on windows, and not bother about auto detection. i just have alias jython=d:/jython-21/jython.bat in my .profile, which probably starts an extra shell(?) but it works. >===== Original Message From bc...@wo... (Finn Bock) ===== >[Steve Cohen] > >>Is there a way to get the jython installer to make a unix shell script >>to launch jython from a cygwin bash shell on Windows 98? > >No, unfortunately not. > >>I want to have >>a real console. Unfortunately, the installer seems to detect that I'm >>running Windows and therefore have no need of a shell script, even if I >>launch the installer from the cygwin bash. > >I know of no way the installer can tell the difference automaticly. > >We already have this as a feature request, so you don't have to add it >yourself: > >> http://sourceforge.net/tracker/index.php?func=detail&aid=437792&group_id=12867&atid=362867 > >regards, >finn > >_______________________________________________ >Jython-users mailing list >Jyt...@li... >https://lists.sourceforge.net/lists/listinfo/jython-users |
From: <bc...@wo...> - 2002-01-03 14:58:03
|
[Severino Fernandez] >I am trying to see if it is possible to convert a running application to >Java. I do not get any problems usin jythonc with the application, it >compiles all the modules building up the application. But when I try tu >run the main class (with java from JDK 1.3), it stops telling me that >the module "warnings" could not be loaded. Jythonc only includes modules it can find in the sources. Unfortunately the jython runtime can import some extra module and jythonc have no to detect that these extra module should be included. The warning modules, the encoding modules and xml.sax.drivers2 modules are common examples of such runtime imports. The workaround is to add a dummy method to your main source file: def _dummy(): # include these modules when compiling with jythonc import warnings The function does not have to be called, it just have to be there. regards, finn |
From: <bc...@wo...> - 2002-01-03 14:48:37
|
[Anders Dahlberg] >Hello! > >I keep getting exceptions when I try to load (java) classes dynamically into >jython :( > >My code is as follows: >... > // Load jython interpreter with correct classloader > try { > String className = "org.python.util.PythonInterpreter"; > ClassLoader loader = >TopManager.getDefault().currentClassLoader(); > Class loaded = loader.loadClass(className); > pythonInterpreter = (PythonInterpreter) >loaded.newInstance(); > > // Add all packages that is mounted in explorer: > if (PySystemState.packageManager instanceof >SysPackageManager) { > SysPackageManager manager = (SysPackageManager) >PySystemState.packageManager; > updateJythonClasspath(manager); > } >... > > private void updateJythonClasspath(SysPackageManager manager) { > Repository repository = TopManager.getDefault().getRepository(); > FileSystem[] fileSystems = repository.toArray(); > > for (int i = 0; i < fileSystems.length; i++) { > FileSystem fileSystem = fileSystems[i]; > > // FIXME: what about non-local filesystems, cvs? > if (JarFileSystem.class.isAssignableFrom(fileSystem.getClass())) >{ > JarFileSystem jarFile = (JarFileSystem) fileSystem; > manager.addJar(jarFile.getJarFile().getPath(), true); > } else if >(LocalFileSystem.class.isAssignableFrom(fileSystem.getClass())) { > LocalFileSystem localFile = (LocalFileSystem) fileSystem; > >manager.addJarDir(localFile.getRootDirectory().getAbsolutePath(), true); > } > } > } > >What am I doing wrong, not doing? The code above seems to add different paths to the packagemanager. It will probably allow jython to know about the "hejsan" package, but in itself it does not do anything to allow jython to import the java classes in these packages. I'm not sure that the trick you do to load the PythonInterpreter with the right classloader is enough. I suppose it depends on the implementation of the classloader but I suspect that the rest of jython.jar will still be loaded by one of the TopManager classloaders parents. Maybe you can verify or dismiss that theory by loading the class org.python.core.Py using the same trick and checking which classloader it was loaded by. If my guessing is correct, a possible solution might be to remove jython.jar from the parent classloaders reach and make sure that you load jython.jar yourself using an URLClassLoader. Another option is the PySystemState.setClassLoader(..) method, but calling that will create a very closed environment where all java imports must be served by the classloader. OTOH when sys.classLoader is set, it doesn't matter which classloader that loaded the jython.jar code. As you can see, jython's support for foreign classloaders still have a way to go before it reach perfection. regards, finn |
From: <bc...@wo...> - 2002-01-03 13:59:41
|
[Steve Cohen] >Is there a way to get the jython installer to make a unix shell script >to launch jython from a cygwin bash shell on Windows 98? No, unfortunately not. >I want to have >a real console. Unfortunately, the installer seems to detect that I'm >running Windows and therefore have no need of a shell script, even if I >launch the installer from the cygwin bash. I know of no way the installer can tell the difference automaticly. We already have this as a feature request, so you don't have to add it yourself: > http://sourceforge.net/tracker/index.php?func=detail&aid=437792&group_id=12867&atid=362867 regards, finn |
From: <bc...@wo...> - 2002-01-03 13:51:58
|
[Robert Welch] >Folks: > >I've got a jython script which creates a java object which runs a >bunch of other jython scripts. Basically, the problem I'm seeing >is as follows: > >#################################### >launcher.py: >from java.util import Vector >from mystuff import JythonLauncher >v = Vector() >v.add( "launchee.py" ) ># initialize v with some other stuff... >jl = JythonLauncher( v ) >jl.launch() # runs launchee.py with an instance of PythonInterpreter >############################################ > >########################################### >launchee.py: >print "Here 1" >from java.util import Vector >print "Here 2" ># other stuff... >########################################### > >I run launcher.py from the jython command prompt as follows: > >>>> from launcher import * Something works for me: >>> from launcher import * Here 1 Here 2 >>> >What I see is that launchee.py is, in fact, launched because >I see "Here 1" printed out. However, "Here 2" never appears. >The launchee.py script seems to hang at the "from java.util import >Vector" >line. Strangely, if I do: > >jython launcher.py > >things seem to work OK (i.e., I get "Here 2" printed out). >Also, when I hacked things up so that launchee.py didn't need Vector >things went OK (it needed to import other stuff but that didn't faze >it). > >Is there some limit to the number of times I can import stuff? No. >Is there a work-around to this problem? The real problem from my POV is that you didn't post your version JythonLauncer. Maybe it does not do the same thing as the one I had to add in order to test your example. Unless you post your version, we will never know. It might also be necessary to know how JythonLauncher is loaded. From the sys.path or the CLASSPATH? regards, finn |
From: Robert W. <rob...@ho...> - 2002-01-03 03:26:50
|
Folks: I've got a jython script which creates a java object which runs a bunch of other jython scripts. Basically, the problem I'm seeing is as follows: #################################### launcher.py: from java.util import Vector from mystuff import JythonLauncher v = Vector() v.add( "launchee.py" ) # initialize v with some other stuff... jl = JythonLauncher( v ) jl.launch() # runs launchee.py with an instance of PythonInterpreter ############################################ ########################################### launchee.py: print "Here 1" from java.util import Vector print "Here 2" # other stuff... ########################################### I run launcher.py from the jython command prompt as follows: >>> from launcher import * What I see is that launchee.py is, in fact, launched because I see "Here 1" printed out. However, "Here 2" never appears. The launchee.py script seems to hang at the "from java.util import Vector" line. Strangely, if I do: jython launcher.py things seem to work OK (i.e., I get "Here 2" printed out). Also, when I hacked things up so that launchee.py didn't need Vector things went OK (it needed to import other stuff but that didn't faze it). Is there some limit to the number of times I can import stuff? Is there a work-around to this problem? My "Learning Python" book has given me few clues (I tried reload() but that didn't seem to work, either). Thanks, ---Rob Welch |
From: dman <ds...@ri...> - 2002-01-02 17:29:17
|
On Wed, Jan 02, 2002 at 07:34:17AM -0700, Kevin Butler wrote: | I haven't explored this, but it seems you could use JNI to embed C | python in the JVM, then invoke Python code in the CPython | interpreter. Sure, or you could use JNI to embed COM directly. I haven't used ILU but it certainly looks worth a try if you need or intend to use something of that nature : http://www.parc.xerox.com/istl/projects/ILU/ -D -- It took the computational power of three Commodore 64s to fly to the moon. It takes at least a 486 to run Windows 95. Something is wrong here. |
From: Anders D. <and...@st...> - 2002-01-02 16:26:15
|
Hello! I keep getting exceptions when I try to load (java) classes dynamically into jython :( My code is as follows: ... // Load jython interpreter with correct classloader try { String className = "org.python.util.PythonInterpreter"; ClassLoader loader = TopManager.getDefault().currentClassLoader(); Class loaded = loader.loadClass(className); pythonInterpreter = (PythonInterpreter) loaded.newInstance(); // Add all packages that is mounted in explorer: if (PySystemState.packageManager instanceof SysPackageManager) { SysPackageManager manager = (SysPackageManager) PySystemState.packageManager; updateJythonClasspath(manager); } ... private void updateJythonClasspath(SysPackageManager manager) { Repository repository = TopManager.getDefault().getRepository(); FileSystem[] fileSystems = repository.toArray(); for (int i = 0; i < fileSystems.length; i++) { FileSystem fileSystem = fileSystems[i]; // FIXME: what about non-local filesystems, cvs? if (JarFileSystem.class.isAssignableFrom(fileSystem.getClass())) { JarFileSystem jarFile = (JarFileSystem) fileSystem; manager.addJar(jarFile.getJarFile().getPath(), true); } else if (LocalFileSystem.class.isAssignableFrom(fileSystem.getClass())) { LocalFileSystem localFile = (LocalFileSystem) fileSystem; manager.addJarDir(localFile.getRootDirectory().getAbsolutePath(), true); } } } What am I doing wrong, not doing? thanks in advance /Anders Example stack trace: "# Jython file - http://www.jython.org/ print "hello world!" from hejsan import * nada = Nada() print nada.hej() " File "<string>", line 5, in ? java.lang.NullPointerException at org.python.core.PyJavaClass.setConstructors(PyJavaClass.java) at org.python.core.PyJavaClass.initConstructors(PyJavaClass.java) at org.python.core.PyJavaClass.__call__(PyJavaClass.java) at org.python.core.PyObject.__call__(PyObject.java) at org.python.pycode._pyx3.f$0(<string>:5) at org.python.pycode._pyx3.call_function(<string>) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyCode.call(PyCode.java) at org.python.core.Py.runCode(Py.java) at org.python.core.Py.exec(Py.java) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java) at org.netbeans.modules.scripting.JPythonScriptType.exec(JPythonScriptType.java :154) at org.netbeans.modules.scripting.AbstractScriptType.exec(AbstractScriptType.ja va:140) at org.openide.execution.ScriptType.exec(ScriptType.java:80) at org.netbeans.modules.scripting.ScriptSupport$1.run(ScriptSupport.java:72) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118) java.lang.NullPointerException: java.lang.NullPointerException at org.python.core.Py.JavaError(Py.java) at org.python.core.PyTableCode.call(PyTableCode.java) at org.python.core.PyCode.call(PyCode.java) at org.python.core.Py.runCode(Py.java) at org.python.core.Py.exec(Py.java) at org.python.util.PythonInterpreter.exec(PythonInterpreter.java) at org.netbeans.modules.scripting.JPythonScriptType.exec(JPythonScriptType.java :154) at org.netbeans.modules.scripting.AbstractScriptType.exec(AbstractScriptType.ja va:140) at org.openide.execution.ScriptType.exec(ScriptType.java:80) at org.netbeans.modules.scripting.ScriptSupport$1.run(ScriptSupport.java:72) [catch] at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118) |
From: Shae E. <sha...@wi...> - 2002-01-02 15:39:04
|
From: "Neil Benn" <nei...@ca...> Subject: RE: [Jython-users] accessing win32com.client from jython Date: 02 Jan 2002 16:39:00 +0200 > > On Mon, Dec 31, 2001 at 10:01:30PM +0000, Dan...@at... wrote: > > | Is there a way in which I can access win32 libraries > > | from jython? > > | Anyone have another approach. The Java-Python Extension was just mentioned on #python on irc.openprojects.net http://www.arakne.com/jpe.htm http://sourceforge.net/projects/jpe PS. Does anyone know of a website hosting Jython snippets? I'd like to both receive and donate. ---- sha...@wi... |
From: Neil B. <nei...@ca...> - 2002-01-02 14:43:41
|
Hello, You can use a Java/COM bridge of which there are several available. Jacob is a good open source one, JIntegra is a paying licence based one. Both work reasonably OK but you do need to know a bit about how COM works. Cheers, Neil Benn Senior Automation Informatics Scientist Cambridge Antibody Technology -----Original Message----- From: jyt...@li... [mailto:jyt...@li...]On Behalf Of Kevin Butler Sent: 02 January 2002 14:34 To: dman Cc: jyt...@li... Subject: Re: [Jython-users] accessing win32com.client from jython I haven't explored this, but it seems you could use JNI to embed C python in the JVM, then invoke Python code in the CPython interpreter. Python-In-Python, anyone? kb dman wrote: > > On Mon, Dec 31, 2001 at 10:01:30PM +0000, Dan...@at... wrote: > | Is there a way in which I can access win32 libraries > | from jython? > | CPython has a set of excellent containers for windws > | platform specific tools. Is there any way in which I can > | access these capabilities from Jython as a way of > | bridging Java and COM without. > | Has anyone ever explored this? > | I know that I could architect things such that I could > | use sockets to communicate from Java/Jython to Cpython- > | hosting-COM, but that seems unecessarily cumbersome to > | me. > | Anyone have another approach. > > Microsoft's JVM supports COM. It is the only one that does, though. > Part of java's goal is to be portable. As such it can't rely on the > underlying platform. A major difference between Java and CPython is > that java takes the least common denominator approach, whereas CPython > (the docs) just warn you that your program won't be portable. > > You could also use any other distributed object middleware to connect > Java/Jython to CPython to take advantage of stuff java doesn't let you > use. For example: XML-RPC or CORBA. > > -D > > -- > > Consider what God has done: > Who can straighten what He has made crooked? > Ecclesiastes 7:13 > > _______________________________________________ > 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: Kevin B. <kb...@ca...> - 2002-01-02 14:34:22
|
I haven't explored this, but it seems you could use JNI to embed C python in the JVM, then invoke Python code in the CPython interpreter. Python-In-Python, anyone? kb dman wrote: > > On Mon, Dec 31, 2001 at 10:01:30PM +0000, Dan...@at... wrote: > | Is there a way in which I can access win32 libraries > | from jython? > | CPython has a set of excellent containers for windws > | platform specific tools. Is there any way in which I can > | access these capabilities from Jython as a way of > | bridging Java and COM without. > | Has anyone ever explored this? > | I know that I could architect things such that I could > | use sockets to communicate from Java/Jython to Cpython- > | hosting-COM, but that seems unecessarily cumbersome to > | me. > | Anyone have another approach. > > Microsoft's JVM supports COM. It is the only one that does, though. > Part of java's goal is to be portable. As such it can't rely on the > underlying platform. A major difference between Java and CPython is > that java takes the least common denominator approach, whereas CPython > (the docs) just warn you that your program won't be portable. > > You could also use any other distributed object middleware to connect > Java/Jython to CPython to take advantage of stuff java doesn't let you > use. For example: XML-RPC or CORBA. > > -D > > -- > > Consider what God has done: > Who can straighten what He has made crooked? > Ecclesiastes 7:13 > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |