You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(107) |
Dec
(67) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(76) |
Feb
(125) |
Mar
(72) |
Apr
(13) |
May
(18) |
Jun
(12) |
Jul
(129) |
Aug
(47) |
Sep
(1) |
Oct
(36) |
Nov
(128) |
Dec
(124) |
2002 |
Jan
(59) |
Feb
|
Mar
(14) |
Apr
(14) |
May
(72) |
Jun
(9) |
Jul
(3) |
Aug
(5) |
Sep
(18) |
Oct
(65) |
Nov
(28) |
Dec
(12) |
2003 |
Jan
(10) |
Feb
(2) |
Mar
(4) |
Apr
(33) |
May
(21) |
Jun
(9) |
Jul
(29) |
Aug
(34) |
Sep
(4) |
Oct
(8) |
Nov
(15) |
Dec
(4) |
2004 |
Jan
(26) |
Feb
(12) |
Mar
(11) |
Apr
(9) |
May
(7) |
Jun
|
Jul
(5) |
Aug
|
Sep
(3) |
Oct
(7) |
Nov
(1) |
Dec
(10) |
2005 |
Jan
(2) |
Feb
(72) |
Mar
(16) |
Apr
(39) |
May
(48) |
Jun
(97) |
Jul
(57) |
Aug
(13) |
Sep
(16) |
Oct
(24) |
Nov
(100) |
Dec
(24) |
2006 |
Jan
(15) |
Feb
(34) |
Mar
(33) |
Apr
(31) |
May
(79) |
Jun
(64) |
Jul
(41) |
Aug
(64) |
Sep
(31) |
Oct
(46) |
Nov
(55) |
Dec
(37) |
2007 |
Jan
(32) |
Feb
(61) |
Mar
(11) |
Apr
(58) |
May
(46) |
Jun
(30) |
Jul
(94) |
Aug
(93) |
Sep
(86) |
Oct
(69) |
Nov
(125) |
Dec
(177) |
2008 |
Jan
(169) |
Feb
(97) |
Mar
(74) |
Apr
(113) |
May
(120) |
Jun
(334) |
Jul
(215) |
Aug
(237) |
Sep
(72) |
Oct
(189) |
Nov
(126) |
Dec
(160) |
2009 |
Jan
(180) |
Feb
(45) |
Mar
(98) |
Apr
(140) |
May
(151) |
Jun
(71) |
Jul
(107) |
Aug
(119) |
Sep
(73) |
Oct
(121) |
Nov
(14) |
Dec
(6) |
2010 |
Jan
(13) |
Feb
(9) |
Mar
(10) |
Apr
(64) |
May
(3) |
Jun
(16) |
Jul
(7) |
Aug
(23) |
Sep
(17) |
Oct
(37) |
Nov
(5) |
Dec
(8) |
2011 |
Jan
(10) |
Feb
(11) |
Mar
(77) |
Apr
(11) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Finn B. <bc...@us...> - 2000-11-13 10:28:59
|
Update of /cvsroot/jython/htdocs/docs In directory slayer.i.sourceforge.net:/tmp/cvs-serv717/docs Added Files: .cvsignore Log Message: First version. --- NEW FILE --- *.html *.ht *.bat |
From: Finn B. <bc...@us...> - 2000-11-13 10:28:58
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv717 Added Files: .cvsignore Log Message: First version. --- NEW FILE --- *.html htdocs.tar.gz *.bat |
From: Finn B. <bc...@us...> - 2000-11-13 10:16:46
|
Update of /cvsroot/jython/htdocs/images In directory slayer.i.sourceforge.net:/tmp/cvs-serv32251 Added Files: PythonPoweredSmall.gif jython-new-small.gif Log Message: First version. --- NEW FILE --- GIF89a7 ¼zÝÊõkدcÑ+ðÇ)éq£C$x ä+ßyñöÛ°`¾ `âF!F ù£ æPÞyùwhj×^hÚ}Åq÷ý@DsÏI·|¿å¶¡ØåxËÅ6ÛvŤMzæc£nörÊ´e-h"~u#~¢¬¹6\P ÐÞØjXczʪ¬± &xÁ8`ÛÄöÇ&¬@oMEÕk,¹L4ÙN<ùPD RL9ÕC¦NA)ÄCIDE)`¤G$IÒ¦ --- NEW FILE --- GIF89a Qz0 `«èèxéZ ì×CN»Qc¬µ^kytÙ>Ýå@ÛîdÛë]§GÔÄ Eþ¡qTäF'{µÕV]v÷UYge ÂiRh\d«¬A è×êävKm8B~sùsuÐ 9A{Èc/oébdï± `UÇ$Í(|2àÙìâ/YåcßôèÆäo&¥@^ýØcÍ}9mUV Ã¥ ÝI^Çò«cÆ&bcW0*ëì6\ÂÔ³Ôö U[mqS í·Ø,¸äkî¹è¦«îºì¶ëî»ðÖ |
From: Finn B. <bc...@us...> - 2000-11-13 10:14:43
|
Update of /cvsroot/jython/htdocs/docs In directory slayer.i.sourceforge.net:/tmp/cvs-serv31873 Added Files: Makefile README links.h Log Message: First version. --- NEW FILE --- PYTHON= python HT2HTML= /opt/ht2html-1.1 .SUFFIXES:: .ht .html .ht.html: $(PYTHON) $(HT2HTML)/ht2html.py -s JPyGenerator -r .. $? HTMLFILES = \ compile.html \ differences.html \ embedding.html \ faq.html \ index.html \ interpreter.html \ jarray.html \ jythonc.html \ properties.html \ registry.html \ subclassing.html \ usejava.html \ whatis.html \ all: $(HTMLFILES) --- NEW FILE --- This is a placeholder for the generated documentation .html file. The files here are generated a little bit differently than the .html files in jython/Doc. See the Makefile for details. The differences are: - This uses another template. - The root is the parent (..) - Here is another (larger) links.h file --- NEW FILE --- <!-- -*- html -*- --> <h3>Home</h3> <li><a href="../index.html">Overview</a> <li><a href="../license.html">License</a> <li><a href="../download.html">Jython 2.0</a> <li><a href="../install.html">Installing</a> <li><a href="../platform.html">JVM Compatibility</a> <h3>Documentation</h3> <li><a href="index.html">Overview</a> <li><a href="whatis.html">Executive Summary</a> <li><a href="interpreter.html">Invoking Jython</a> <li><a href="registry.html">Jython Registry</a> <li><a href="embedding.html">Embedding</a> <li><a href="compile.html">Compiling Jython from source</a> <h3>Working with Java</h3> <li><a href="usejava.html">The Basics</a> <li><a href="properties.html">JavaBean Properties</a> <li><a href="jarray.html">Java arrays</a> <li><a href="subclassing.html">Subclassing</a> <li><a href="jythonc.html">Building applets, servlets, beans...</a> <h3>Python Docs (exits)</h3> <li><a href="http://www.python.org/doc/tut/tut.html">Python Tutorial</a> <li><a href="http://www.python.org/doc/lib/lib.html">Library Reference</a> <h3>Other</h3> <li><a href="differences.html">Jython vs. CPython</a> <li><a href="faq.html">Jython FAQ</a> <li><a href="http://www.geocrawler.com/archives/3/7017/2000/">List Archives</a> (exit) <LI><A HREF="http://www.python.org/workshops/1997-10/proceedings/hugunin.html">JPython paper</A> (exit) |
From: Finn B. <bc...@us...> - 2000-11-13 10:12:17
|
Update of /cvsroot/jython/htdocs/docs In directory slayer.i.sourceforge.net:/tmp/cvs-serv31577/docs Log Message: Directory /cvsroot/jython/htdocs/docs added to the repository |
From: Finn B. <bc...@us...> - 2000-11-13 10:12:17
|
Update of /cvsroot/jython/htdocs/images In directory slayer.i.sourceforge.net:/tmp/cvs-serv31577/images Log Message: Directory /cvsroot/jython/htdocs/images added to the repository |
From: Finn B. <bc...@us...> - 2000-11-13 10:11:17
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv31454 Added Files: license.ht Log Message: The original JPython-1.1 license. Must be updated before the first release. --- NEW FILE --- <pre> ______________________________________________________________________ IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. BY CLICKING ON THE "ACCEPT" BUTTON WHERE INDICATED, OR BY INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS AGREEMENT. ______________________________________________________________________ JPython version 1.1.x 1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and using JPython version 1.1.x in source or binary form and its associated documentation as provided herein ("Software"). 2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a non-exclusive, non-transferable, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright ©1996-1999 Corporation for National Research Initiatives; All Rights Reserved" are both retained in the Software, alone or in any derivative version prepared by Licensee. Alternatively, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes), provided, however, that such text is displayed prominently in the Software alone or in any derivative version prepared by Licensee: "JPython (Version 1.1.x) is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1006. The License may also be obtained from a proxy server on the Web using the following URL: http://hdl.handle.net/1895.22/1006." 3. In the event Licensee prepares a derivative work that is based on or incorporates the Software or any part thereof, and wants to make the derivative work available to the public as provided herein, then Licensee hereby agrees to indicate in any such work, in a prominently visible way, the nature of the modifications made to CNRI's Software. 4. Licensee may not use CNRI trademarks or trade name, including JPython or CNRI, in a trademark sense to endorse or promote products or services of Licensee, or any third party. Licensee may use the mark JPython in connection with Licensee's derivative versions that are based on or incorporate the Software, but only in the form "JPython-based ___________________," or equivalent. 5. CNRI is making the Software available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. 6. CNRI SHALL NOT BE LIABLE TO LICENSEE OR OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. SOME STATES DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY SO THE ABOVE DISCLAIMER MAY NOT APPLY TO LICENSEE. 7. This License Agreement may be terminated by CNRI (i) immediately upon written notice from CNRI of any material breach by the Licensee, if the nature of the breach is such that it cannot be promptly remedied; or (ii) sixty (60) days following notice from CNRI to Licensee of a material remediable breach, if Licensee has not remedied such breach within that sixty-day period. 8. This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding conflict of law provisions. Nothing in this Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. 9. By clicking on the "ACCEPT" button where indicated, or by installing, copying or otherwise using the Software, Licensee agrees to be bound by the terms and conditions of this License Agreement. [ACCEPT BUTTON] </pre> |
From: Finn B. <bc...@us...> - 2000-11-13 10:08:55
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv31219 Added Files: Makefile README Log Message: First version. --- NEW FILE --- PYTHON= python HT2HTML= /opt/ht2html-1.1 .SUFFIXES:: .ht .html .ht.html: $(PYTHON) $(HT2HTML)/ht2html.py -s JPyGenerator $? HTMLFILES = \ download.html \ index.html \ platform.html \ install.html \ users.html \ license.html \ all: $(HTMLFILES) --- NEW FILE --- This directory contains the "source" for the jython website. The html pagaes are generated by the ht2html tool which must be installed separately: http://www.python.org/~bwarsaw/software/pyware.html See the Makefile for details on how the pages are generated. (Each page must be generated separately. Giving multiple ht-files as argument to ht2html does not work for me) Makefile Generates the .html files from .ht files. Works on windows (nmake) and should also work on unix. links.h List of links to the sidebar on each webpage. applets/ The example applets. docs/ The documentation. This is just a placeholder for the files from jython/Doc. See docs/README for details. images/ Gif files used by the website. |
From: Finn B. <bc...@us...> - 2000-11-13 10:07:59
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv31115 Modified Files: index.ht Log Message: Improved the grammar. Index: index.ht =================================================================== RCS file: /cvsroot/jython/htdocs/index.ht,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** index.ht 2000/11/12 22:47:41 1.1 --- index.ht 2000/11/13 10:07:54 1.2 *************** *** 8,12 **** allows you to run Python on any Java platform. - <ul> <li>What is <A HREF="docs/whatis.html">Jython</A> --- 8,11 ---- *************** *** 18,27 **** <h3><em><font size=+1 color="red">Jython News</font></em></h3> ! <em><b>Note that these pages does not correctly reflect the current state ! of Jython. Most importantly, there does not yet exists a downloadable ! version. ! </b></em> <dl> <!-- --- 17,30 ---- <h3><em><font size=+1 color="red">Jython News</font></em></h3> + + + <b><em>Note</em>: A downloadable version of Jython is + not yet available.</b> ! <p>The current state of Jython development is not accurately ! represented in these pages. Consider joining the Jython ! mailing lists for more current information. <br> + <dl> <!-- *************** *** 31,36 **** of recent changes. (XX-oct-2000). --> ! <p><dt>Jython project announced ! <dd>The Jython project have started on sourceforge. Read the <a href="http://www.python.org/pipermail/jpython-interest/2000-October/006417.html"> announcement</a>. --- 34,39 ---- of recent changes. (XX-oct-2000). --> ! <p><dt><b>Jython project announced</b> ! <dd>The Jython project have been created on sourceforge. Read the <a href="http://www.python.org/pipermail/jpython-interest/2000-October/006417.html"> announcement</a>. *************** *** 41,47 **** <dl> ! <dt>2000-11-08 <dd>JPython is mentioned in an <a href="http://www.javasoft.com/features/2000/11/dotnetvsms.html?frontpage-banner"> article</a> that compares the Java platform with MicroSoft's .NET </dl> --- 44,52 ---- <dl> ! <dt>8-nov-2000 <dd>JPython is mentioned in an <a href="http://www.javasoft.com/features/2000/11/dotnetvsms.html?frontpage-banner"> article</a> that compares the Java platform with MicroSoft's .NET </dl> + + <font size=-1> last updated 12-now-2000 </font>" |
From: Finn B. <bc...@us...> - 2000-11-13 10:07:11
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv31022 Modified Files: platform.ht Log Message: Updated info on linux and solaris. Index: platform.ht =================================================================== RCS file: /cvsroot/jython/htdocs/platform.ht,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** platform.ht 2000/11/12 22:47:41 1.1 --- platform.ht 2000/11/13 10:07:09 1.2 *************** *** 36,43 **** <H3>Linux</H3> ! <H4><A HREF="http://www.blackdown.org/java-linux.html">JDK 1.1.6 from blackdown.org</A></H4> - <P>There should be no problems running Jython on this JVM. - <H3>Macintosh</H3> --- 36,53 ---- <H3>Linux</H3> ! <H4><A HREF="http://www.blackdown.org/java-linux/ports.html">www.blackdown.org</A></H4> ! Following blackdown versions have been used with jython. ! <ul> ! <li>1.3.0 ppc, i386 ! <li>1.2.2 i386, ppc ! <li>1.1.8 v3 ppc, i386 ! </ul> ! ! <h4><a HREF="http://www.ibm.com/java/jdk">IBMJava</a></h4> ! <ul> ! <li><a href="http://www.ibm.com/java/jdk/linux130/">IBMJava jdk for linux 2-13</a> ! <li><a href="http://www.ibm.com/java/jdk/118/linux/">IBMJava jdk for linux 1.1.8></a> ! </ul> <H3>Macintosh</H3> *************** *** 54,68 **** <H3>Solaris</H3> - - <H4><A HREF="http://www.sun.com/solaris/jre/index.html">JRE 1.1.6 - from SUN</A></H4> ! <P>Solaris 2.6 comes with JDK 1.1.3. The JIT compiler in this release ! has a number of serious bugs that can lead to confusing errors. ! You can type "java -version" to determine what release ! you have installed on your machine. While Jython will generally ! work with the 1.1.3 JVM, I strongly recommend that Solaris users ! upgrade to this latest version to avoid being bitten by hard to ! track down JIT related bugs. <H3>Windows NT, 95, and 98, Windows 2000</H3> --- 64,73 ---- <H3>Solaris</H3> ! <H4><A HREF="http://www.sun.com/solaris/jre/index.html">JRE/JDK from SUN</A></H4> ! <ul> ! <li>Sun jdk 1.1.8 ! <li>Sun jdk 1.2 ! </ul> <H3>Windows NT, 95, and 98, Windows 2000</H3> |
From: Finn B. <bc...@us...> - 2000-11-13 10:05:09
|
Update of /cvsroot/jython/htdocs/applets In directory slayer.i.sourceforge.net:/tmp/cvs-serv30667 Added Files: Makefile README Log Message: First version. --- NEW FILE --- PYTHON= python HT2HTML= /opt/ht2html-1.1 .SUFFIXES:: .ht .html .ht.html: $(PYTHON) $(HT2HTML)/ht2html.py -s JPyGenerator -r .. $? HTMLFILES = \ button.html \ checkbox.html \ choice.html \ converter.html \ coordinates.html \ index.html \ issues.html \ label.html \ list.html \ problems.html all: $(HTMLFILES) --- NEW FILE --- This directory contains applet demos. The html files are generated by ht2html. See ../README for details. The demo applets exists in jython/Demo/applet and the applet appletdemo.jar file is created by this command in the Demo/applet directory: jythonc --core --deep --jar appletdemo.jar *.py appletdemo.jar: This file is create by the command above. appletdemo.cab Can only be created on a windows platform. The files in appletdemo.jar are extracted into an empty temporary directory and the .cab file is then created by running: CABARC N appletdemo.cab * CABARC is part of the MS-SDK for java http://www.microsoft.com/java JythonLoader.java A timer that stops when the HelloWorld applet if loaded. JythonLoader.class Compiles version of JythonLoader.java |
From: Finn B. <bc...@us...> - 2000-11-12 22:51:39
|
Update of /cvsroot/jython/htdocs/applets In directory slayer.i.sourceforge.net:/tmp/cvs-serv20295 Added Files: JythonLoader.java Log Message: First version. --- NEW FILE --- import java.applet.*; import java.awt.*; import java.util.*; public class JythonLoader extends Applet implements Runnable { public Label etime, l1, l1a; Thread timer; long initialTime; public void init() { setFont(new Font("Normal", Font.BOLD, 15)); l1 = new Label("Jython Library is loading..."); l1.setAlignment(Label.CENTER); l1a = new Label("Please wait"); l1a.setAlignment(Label.CENTER); l1a.setForeground(Color.red); Label l2 = new Label("Elapsed time: "); l2.setAlignment(Label.RIGHT); etime = new Label("0:00.0"); etime.setFont(new Font("Courier", Font.BOLD, 15)); GridBagConstraints c = new GridBagConstraints(); GridBagLayout bag = new GridBagLayout(); setLayout(bag); c.fill = GridBagConstraints.BOTH; c.gridwidth = GridBagConstraints.REMAINDER; bag.setConstraints(l1, c); add(l1); bag.setConstraints(l1a, c); add(l1a); c.gridwidth = GridBagConstraints.RELATIVE; c.weightx = 1.0; bag.setConstraints(l2, c); add(l2); c.gridwidth = GridBagConstraints.REMAINDER; c.weightx = 0.0; bag.setConstraints(etime, c); add(etime); } public void paint(Graphics g) { Dimension d = getSize(); g.drawRect(1,1,d.width-3, d.height-3); g.drawRect(3,3,d.width-7, d.height-7); } public Insets getInsets() { return new Insets(7,7,7,7); } private int activeApplets() { Enumeration e = getAppletContext().getApplets(); int n; for (n=0; e.hasMoreElements(); ) { Applet a = (Applet)e.nextElement(); if (a != null && a.isActive()) n++; } return n; } private void updateText() { long t0 = System.currentTimeMillis()-initialTime; String minutes = Integer.toString((int)(t0/1000)%60); if (minutes.length() < 2) minutes = "0"+minutes; String ts = ""+(t0/60000)+":"+minutes+"."+((t0/100)%10); etime.setText(ts); //+", "+activeApplets()); } private void done() { l1.setText("Jython Loading Complete"); l1a.setText(""); } public void run() { //Thread.currentThread().setPriority(Thread.MIN_PRIORITY); //System.out.println("Running"); while (true) { //System.out.println("Running"); int n = activeApplets(); if (n > 1) break; updateText(); try { Thread.sleep(100); } catch (InterruptedException e) { break; } } done(); } public void start() { initialTime = System.currentTimeMillis(); timer = new Thread(this); timer.start(); } } |
From: Finn B. <bc...@us...> - 2000-11-12 22:50:33
|
Update of /cvsroot/jython/htdocs/applets In directory slayer.i.sourceforge.net:/tmp/cvs-serv20224 Added Files: button.ht checkbox.ht choice.ht converter.ht coordinates.ht index.ht issues.ht label.ht links.h list.ht problems.ht Log Message: First version. --- NEW FILE --- Title: Button Example <h3>Using Buttons</h3> <p>This example shows how to use Buttons from Jython. Three buttons should be displayed in the applet below. <applet code="ButtonDemo" archive="appletdemo.jar" width = 500 height = 35 alt="This browser doesn't support JDK 1.1 applets."> <param name=cabbase0 value="appletdemo.cab"> <h3>Something has gone wrong loading this applet.</h3> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import awt, applet class ButtonDemo(applet.Applet): def init(self): self.b1 = awt.Button('Disable middle button', actionPerformed=self.disable) self.b2 = awt.Button('Middle button') self.b3 = awt.Button('Enable middle button', enabled=0, actionPerformed=self.enable) self.add(self.b1) self.add(self.b2) self.add(self.b3) def enable(self, event): self.b1.enabled = self.b2.enabled = 1 self.b3.enabled = 0 def disable(self, event): self.b1.enabled = self.b2.enabled = 0 self.b3.enabled = 1 <hr></pre></blockquote> The init method creates three buttons with the appropriate labels. It also specifies the actions to be performed when the first and third buttons are clicked. These actions are specified using <a href="../docs/properties.html">event properties</a>. Finally, this method adds these three buttons to the applet (which is using the default FlowLayout). <p>The enable and disable methods change the states of the buttons as appropriate. Notice that this is done using the enabled <a href="../docs/properties.html">property</a> of the Buttons. <p> --- NEW FILE --- Title: Checkbox Example <h3>Using Checkboxes</h3> <p>This example shows how to use Checkboxes from Jython. <p> <applet code="CheckboxDemo" archive="appletdemo.jar" width = 350 height = 90 alt="This browser doesn't support JDK 1.1 applets."> <h3>Something has gone wrong loading this applet.</h3> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import awt, applet class CheckboxDemo(applet.Applet): def init(self): cb1 = awt.Checkbox('Checkbox 1') cb2 = awt.Checkbox('Checkbox 2') cb3 = awt.Checkbox('Checkbox 3', state=1) p1 = awt.Panel(layout=awt.FlowLayout()) p1.add(cb1) p1.add(cb2) p1.add(cb3) cbg = awt.CheckboxGroup() cb4 = awt.Checkbox('Checkbox 4', cbg, 0) cb5 = awt.Checkbox('Checkbox 5', cbg, 0) cb6 = awt.Checkbox('Checkbox 6', cbg, 0) p2 = awt.Panel(layout=awt.FlowLayout()) p2.add(cb4) p2.add(cb5) p2.add(cb6) self.setLayout(awt.GridLayout(0, 2)) self.add(p1) self.add(p2) self.validate() <hr></pre></blockquote> The first panel (p1) holds three checkboxes that are not grouped together in any way. The third checkbox is initially set to checked using its state <a href="../docs/properties.html">property</a> as a keyword argument. The second panel holds a group of three checkboxes that all belong to the same checkbox group. <p> --- NEW FILE --- Title: Choice Example <h3>Using Choices</h3> <p>This example shows how to use Choices from Jython. <p> <applet code="ChoiceDemo" archive="appletdemo.jar" width = 350 height = 40 alt="This browser doesn't support JDK 1.1 applets."> <h2>Something has gone wrong loading this applet.</h2> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import awt, applet class ChoiceDemo(applet.Applet): def init(self): self.choices = awt.Choice(itemStateChanged = self.change) for item in ['ichi', 'ni', 'san', 'yon']: self.choices.addItem(item) self.label = awt.Label() self.change() self.add(self.choices) self.add(self.label) def change(self, event=None): selection = self.choices.selectedIndex, self.choices.selectedItem self.label.text = 'Item #%d selected. Text = "%s".' % selection <hr></pre></blockquote> The init method first creates a Choice object and sets its callback for when a new item is selected. This callback is specified as the itemStateChanged <a href="../docs/properties.html">event property</a>. Then four items are added to the choice object and the rest of the layout is initialized. <p> The change method is invoked whenever the selection in the choice object changes. It uses Python string formatting operator to display the current state to the user. <p> --- NEW FILE --- Title: Metric to English Conversion Applet</title> <h3>A Metric to English Converter</h3> <p>This example shows how to put a number of different gui components together to build a complete system. It does the amazing task of converting between the metric and english measurement systems. <p> <applet code="Converter" archive="appletdemo.jar" width = 500 height = 150 alt="This browser doesn't support JDK 1.1 applets."> <param name=cabbase0 value="appletdemo.cab"> <h3>Something has gone wrong loading this applet.</h3> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import awt from java.applet import Applet from java.awt.event import ActionListener, ItemListener, AdjustmentListener from pawt import GridBag basicUnits = [ ['Metric System', [('Centimeters', 0.01), ('Meters', 1.0), ('Kilometers', 1000.0)]], ['U.S. System', [('Inches', 0.0254), ('Feet', 0.305), ('Yards', 0.914), ('Miles', 1613.0)]]] class SimpleBorder: def paint(self, g): g.drawRect(0,0,self.size.width-1, self.size.height-1) def getInsets(self): return awt.Insets(5,5,5,5) class Converter(Applet, SimpleBorder): def init(self, unitSets=basicUnits): self.setLayout(awt.GridLayout(2,0,5,5)) self.panels = [] for name, units in unitSets: panel = ConversionPanel(name, units, self) self.panels.append(panel) self.add(panel) def convert(self, master): value = master.getValue() multiplier = master.getMultiplier() for panel in self.panels: if panel is not master: panel.setValue(multiplier/panel.getMultiplier()*value) class ConversionPanel(awt.Panel, SimpleBorder, ActionListener, AdjustmentListener, ItemListener): max, block = 10000, 100 def __init__(self, title, units, controller): self.units = units self.controller = controller awt.Panel.__init__(self) bag = GridBag(self, fill='HORIZONTAL') label = awt.Label(title, awt.Label.CENTER) bag.addRow(label) self.text = awt.TextField('0', 10, actionListener=self) bag.add(self.text, weightx=1.0) self.chooser = awt.Choice(itemListener=self) for name, multiplier in units: self.chooser.add(name) bag.addRow(self.chooser) self.slider = awt.Scrollbar(awt.Scrollbar.HORIZONTAL, maximum=self.max+10, blockIncrement=self.block, adjustmentListener=self) bag.add(self.slider) def getMultiplier(self): return self.units[self.chooser.selectedIndex][1] def getValue(self): try: return float(self.text.getText()) except: return 0.0 def actionPerformed(self, e): self.setSlider(self.getValue()) self.controller.convert(self) def itemStateChanged(self, e): self.controller.convert(self) def adjustmentValueChanged(self, e): self.text.setText(str(e.getValue())) self.controller.convert(self) def setValue(self, v): self.text.setText(str(v)) self.setSlider(v) def setSlider(self, f): if f > self.max: f = self.max if f < 0: f = 0 self.slider.value = int(f) <hr></pre></blockquote> Hopefully after looking over the previous examples, this code should be fairly easy to read. If not, you'll have to wait until I have the time to write up a good explanation for this example. <p> --- NEW FILE --- Title: Simple Drawing Example <h3>Drawing to a Canvas</h3> <p>This example shows how to draw to a Canvas from Jython. This is low level drawing using the basic Java Graphics API's. <p> <applet code="CoordinatesDemo" archive="appletdemo.jar" width = 300 height = 200 alt="This browser doesn't support JDK 1.1 applets."> <param name=cabbase0 value="appletdemo.cab"> <h3>Something has gone wrong loading this applet.</h3> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import applet, awt from pawt import GridBag class CoordinatesDemo(applet.Applet): def init(self): bag = GridBag(self) self.framedArea = FramedArea(self) bag.addRow(self.framedArea, weighty=1.0, fill='BOTH') self.label = awt.Label('Click within the framed area') bag.addRow(self.label, weightx=1.0, weighty=0.0, fill='HORIZONTAL') def updateLabel(self, point): text = 'Click occurred at coordinate (%d, %d).' self.label.text = text % (point.x, point.y) class FramedArea(awt.Panel): def __init__(self, controller): awt.Panel.__init__(self) self.background = awt.Color.lightGray self.setLayout(awt.GridLayout(1,0)) self.add(CoordinateArea(controller)) def getInsets(self): return awt.Insets(4,4,5,5) def paint(self, g): d = self.size g.color = self.background g.draw3DRect(0, 0, d.width-1, d.height-1, 1) g.draw3DRect(3, 3, d.width-7, d.height-7, 1) class CoordinateArea(awt.Canvas): def __init__(self, controller): awt.Canvas.__init__(self) self.mousePressed = self.push self.controller = controller def push(self, e): try: self.point.x = e.x self.point.y = e.y except AttributeError: self.point = awt.Point(e.x, e.y) self.repaint() def paint(self, g): if hasattr(self, 'point'): self.controller.updateLabel(self.point) g.fillRect(self.point.x-1, self.point.y-1, 2, 2) <hr></pre></blockquote> This example defines three classes. The first is the actual applet, CoordinatesDemo sets up the label where text is displayed, and the FramedArea panel where drawing takes place. This is an example of using the GridBag utility class provided with Jython to make using the GridBagLayout style easier. This is a very powerful layout manager, and I strongly encourage you to consider using it for your own applications. Hopefully the GridBag utility class will make this powerful layout manager much easier to use in Jython. <p> The second class is a very simple framed area. It simply draws a border around an interior CoordinateArea. <p> The final class is the CoordinateArea which does the actual drawing. At creation time, this class sets up the callback so that its push method will be invoked when the user presses the mouse within its frame. The push method simply updates the current location of the point (setting it if it hasn't been defined yet). <p> The paint method does the actual drawing (only if the user has clicked on some point). It first updates its controller's label widget with the current coordinates, and then it draws the point the user has selected using the fillRect method on the Graphics object. <p> --- NEW FILE --- Title: Easy Applets with Jython <H3>Jython Applet Demos</H3> <UL> <B>Note: You must be running a <A HREF="problems.html">JDK 1.1 compliant web browser</A> to view the applets on this page.</B> </UL> <P> <CENTER> <APPLET Code="JythonLoader" WIDTH="220" HEIGHT="90" ALIGN="BOTTOM"> </APPLET> </CENTER> Wait until the Jython library has completely loaded before continuing. This library is about 200K and should take around 1 minute to download over a 28.8 modem. You should expect considerably faster download times if you have a better network connection. <em>Here is the <a href="JythonLoader.java">Java source</a> code for the Jython loading display you see above.</em> <P>Once the library has loaded, your first Jython applet will appear below: <CENTER> <APPLET ARCHIVE="appletdemo.jar" CODE="HelloWorld" WIDTH="160" HEIGHT="50" ALIGN="BOTTOM" alt="This browser doesn't support JDK 1.1 applets."> <PARAM NAME="cabbase0" VALUE="appletdemo.cab"> <H3>Something has gone wrong loading this applet.</H3> </APPLET> </CENTER> If you don't see the text "Hello from Jython!" above, then something has gone wrong. See <A HREF="problems.html">what to do when Jython applets don't work</A> for suggestions on how to fix the problem. <P>The complete source code for this applet is displayed below: <BR> <blockquote><pre> <HR> from java.applet import Applet class HelloWorld(Applet): def paint(self, g): g.drawString("Hello from Jython!" 20, 30) <HR> </pre></blockquote> <H3>More Examples of Jython Applets</H3> Examples based on <A HREF="http://java.sun.com/docs/books/tutorial">The Java Tutorial</A> Examples <UL> <LI>Using the basic AWT GUI elements <UL> <LI><A HREF="button.html">ButtonDemo</A> <LI><A HREF="checkbox.html">CheckboxDemo</A> <LI><A HREF="choice.html">ChoiceDemo</A> <LI><A HREF="label.html">LabelDemo</A> <LI><A HREF="list.html">ListDemo</A> </UL> <LI>Low-level drawing <UL> <LI><A HREF="coordinates.html">CoordinatesDemo</A> </UL> <LI>Putting it all together <UL> <LI><A HREF="converter.html">Converter</A> - a simple metric to english conversion applet </UL> </UL> </BODY> </HTML> --- NEW FILE --- Title: Applet Issues <h3>Jython Applet Issues</h3> <ol> <li>The Jython libraries add about 150K to the size of any applets. Due to the caching behavior of most browsers, this is a one-time cost that users must pay only the first time they download any applet (from your web pages) which uses Jython. Currently this problem is more severe as a result of Netscapes limitations on using multiple jar files for a single applet. This requires bundling the library and the applet code together. Netscape is aware of this problem and plans to fix it in a future release. <li>Can't use "exec" or "eval" in (unsigned) applets. Because Jython takes the approach of compiling Python source code directly to Java bytecodes, it can only dynamically interpret Python code if it can dynamically load Java bytecode. This is currently impossible without creating a custom ClassLoader and this operation violates Java's security model. Any applet that wants to dynamically execute arbitrary strings of Python code must be signed and given permission by the user. <p>This is much less of a problem for Python than it would be for most languages because the dynamic features of the language mean that exec and eval are actually needed very rarely in practice. <P>I'm hoping that JavaSoft will eventually fix the design of the ClassLoader API to make this possible in a secure fashion. It is currently possible to kludge together a solution by shipping the bytes for the new Python class back to the server and then downloading them back to the client, but I can't imagine this effort will be worthwhile. However, the fact that it can be done convinces me that there is no inherent security problem with the functionality that Jython wants. <P>If somebody has a really strong need for exec and/or eval in a Jython applet, it would certainly be possible to add this support. This would involve implementing a true Python interpreter instead of the current dynamic Python -> Java bytecode compiler. I haven't yet seen an application that is sufficiently compelling to convince me that this effort would be worth my time (not to mention the hassle of maintaining two parallel code bases - one for the interpreter and one for the compiler). <li>When will Netscape truly support JDK 1.1? </ul> <p> --- NEW FILE --- Title: Label Example <h3>Using Labels</h3> <p>This example shows how to use Labels from Jython. <p> <applet code="LabelDemo" archive="appletdemo.jar" width = 150 height = 100 alt="This browser doesn't support JDK 1.1 applets."> <h3>Something has gone wrong loading this applet.</h3> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import applet from java.awt import Label, GridLayout class LabelDemo(applet.Applet): def init(self): self.setLayout(GridLayout(0,1)) self.add(Label('Left')) self.add(Label('Center', Label.CENTER)) self.add(Label('Right', Label.RIGHT)) <hr></pre></blockquote> Three labels are created with different alignments. The first has the default left alignment and the other two are centered and right aligned. <p> --- NEW FILE --- <!-- -*- html -*- --> <h3>Home</h3> <li><a href="../index.html">Overview</a> <li><a href="../license.html">License</a> <li><a href="../download.html">Jython 2.0</a> <li><a href="../install.html">Installing</a> <li><a href="../platform.html">JVM Compatibility</a> <h3>Applets</h3> <li><a href="index.html">Demos</a> <li><a href="button.html">ButtonDemo</a> <li><a href="checkbox.html">CheckboxDemo</a> <li><a href="choice.html">ChoiceDemo</a> <li><a href="label.html">LabelDemo</a> <li><a href="list.html">ListDemo</a> <li><a href="coordinates.html">CoordinatesDemo</a> <li><a href="converter.html">ConvertDemo</a> <h3>Applet Problems</h3> <li><a href="problems.html">Here's what to do</a> <li><a href="issues.html">Other applet issues</a> --- NEW FILE --- Title: List Example <h3>Using Lists</h3> <p>This example shows how to use Lists from Jython. <p> <applet code="ListDemo" archive="appletdemo.jar" width = 500 height = 150 alt="This browser doesn't support JDK 1.1 applets."> <h3>Something has gone wrong loading this applet.</h3> </applet> <p>The complete source code for this example is included below. <blockquote><pre><hr> from java import applet, awt from java.awt.event import ItemEvent from pawt import GridBag class ListDemo(applet.Applet): def fillList(self, list, names): list.actionPerformed=self.action list.itemStateChanged=self.change for name in names: list.add(name) def init(self): self.spanish = awt.List(4, 1) self.fillList(self.spanish, ['uno', 'dos', 'tres', 'cuatro', 'cinco', 'seis', 'siete']) self.italian = awt.List() self.fillList(self.italian, ['uno', 'due', 'tre', 'quattro', 'cinque', 'sei', 'sette']) self.output = awt.TextArea(10, 40, editable=0) bag = GridBag(self) bag.add(self.output, fill='BOTH', weightx=1.0, weighty=1.0, gridheight=2) bag.addRow(self.spanish, fill='VERTICAL') bag.addRow(self.italian, fill='VERTICAL') self.language = {self.spanish:'Spanish', self.italian:'Italian'} def action(self, e): list = e.source text = 'Action event occurred on "%s" in %s.\n' self.output.append(text % (list.selectedItem, self.language[list])) def change(self, e): list = e.source if e.stateChange == ItemEvent.SELECTED: select = 'Select' else: select = 'Deselect' text = '%s event occurred on item #%d (%s) in %s.\n' params = (select, e.item, list.getItem(e.item), self.language[list]) self.output.append(text % params) <hr></pre></blockquote> The fillList method is defined to take a list and a set of names and insert those names as list items. It also sets the action methods for the list for both single and double clicking. <p> This init method creates and fills lists of spanish and italian numbers. It uses a GridBag to layout the lists and a text widget in the applet. This GridBag is a wrapper placed on the awt.GridBagLayout and GridBagConstraints classes to make this very powerful layout method easier to use. <p> The action method is invoked whener a list item is double clicked. It uses Python's % operator on strings for convenient text formatting. <p> The change method is invoked when a list item is selected or deselected. It's primary difference from the Java implementation is to use a dictionary of languages instead of a case statement to determine the appropriate text to display. This is an example of the ease of use of standard data types (lists and dictionaries) from Python. <p> --- NEW FILE --- Title: Solving Applet Problems <H3>Solving Jython Applet Problems</H3> <P>If you are having problems getting a Jython applet to run on your browser, you should follow the following steps. <p>1. Make sure that you have a jdk 1.1 compliant browser. At the moment these include: <OL> <LI><A HREF="http://www.javasoft.com/products/hotjava">SUN's HotJava</A> <UL> <LI>Unsurprisingly, this browser works extremely well with Java applets </UL> <LI><A HREF="http://www.microsoft.com/ie/">Microsoft's Internet Explorer 4.0</A> <UL> <LI>Somewhat surprisingly, IE 4.0 is far superior to Netscape 4.0 for JDK 1.1 compliance and performance. This might have finally been fixed with Navigator 4.06, but I haven't had the time to do a detailed comparision recently. </UL> <LI><A HREF="http://home.netscape.com/browsers/">Netscape's Navigator 4.06 or later</A> <UL> <LI>The latest release of Netscape's browser finally comes with acceptable JDK 1.1 support without needing any patches. All I can say is, it's about time! <LI>Note: It has been reported that the JVM in the Linux release of Navigator 4.06 has serious problems that render it unusable. Similar problems might occur on other Unix platforms. </UL> <LI><I>SUN's Java Activator - not currently enabled</I> <UL> <LI><I>Jython applets should almost certainly work with the Java Activator, but I haven't yet invested the time to get the demo of this up and running.</I> </UL> </OL> <P>2. Make sure you don't have any old releases of Jython in your class path. <OL> <LI>If you are running a SUN (or SUN-like) VM you need to make sure your CLASSPATH environment variable is not pointing to any directories with Jython .class files <LI>If you are running a MS VM, you should probably check out the registry entry under LOCAL_MACHINE/Software/Microsoft/Java VM/Classpath </OL> <P>3. Send mail to <A HREF="mailto:jyt...@li...">jython-dev</A> explaining your problem. Include the following information: <OL> <LI>What OS (name and version) and Browser (name and version) you are running <LI>A copy of your Java console window after failing to run an applet <UL> <LI>Under IE, you need to explicitly enable the Java console, or Java logging </UL> <LI>The URL of the applet that didn't work for you </OL> <p> |
From: Finn B. <bc...@us...> - 2000-11-12 22:48:42
|
Update of /cvsroot/jython/htdocs/applets In directory slayer.i.sourceforge.net:/tmp/cvs-serv19977/applets Log Message: Directory /cvsroot/jython/htdocs/applets added to the repository |
From: Finn B. <bc...@us...> - 2000-11-12 22:47:44
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv19901 Added Files: download.ht index.ht install.ht platform.ht users.ht Log Message: First version. --- NEW FILE --- Title: Download Jython <h3>Download Jython</h3> <em><b>Developers note:</b> The latest snapshopts of the Jython source code is now <a href="http://sourceforge.net/cvs/?group_id=12867"> available via CVS</a>!</em> <p>Here are the steps you need to perform in order to download Jython. Once you've done this, you should read the <a href="install.html">installation instructions</a>. <ol> <li><b>Check that you have a working Java 1.1 or 1.2 compatible JVM installed</b> <P>If you already know that you have a JVM which is Java 1.1 or 1.2 compliant, go on to step 2. Otherwise, you should read this information on <A HREF="platform.html">finding and installing an appropriate JVM for your platform</A>. <p><li><b>Download Jython</b> <p>Please use the following links to view and accept the licenses for Jython 2.0. <p><ul> <li><a href="license.html">Read the license</a> <li><a href="http://sourceforge.net/project/showfiles.php?group_id=12867"> Download Jython 2.0 alpha 1</a> <li><a href="install.html">View Installation instructions</a> </ul> <p><li><b>Subscribe to the Jython-users mailing list (<i>optional</i>)</b> <P>The <A HREF="http://lists.sourceforge.net/mailman/listinfo/jython-users"> Jython-users</a> mailing list is used to discuss using Jython effectively, what features Jython needs, and to make announcements of new releases. The web page below will allow you to subscribe to the list. It will also let you view the past archives of the list. This mailing list is managed by <a href="http://www.list.org/">Mailman</a>. <p><li><b>Send a short note telling us what you're doing/what you need (<i>optional</i>)</b> <P>We'd really like to hear what people are doing with Jython as well as what they'd like to do but can't because some feature is missing. You can drop us a note at <a href="mailto:jyt...@li...">jython-dev</a>. Example comments: <p><HR ALIGN="CENTER"> <TT>I'd love to build an amazing new FooBar with Jython, but I can't because it's too slow/doesn't support applets well enough/has a too restrictive license/needs to support the foo.py module/has too many bugs/doesn't have enough documentation/...</TT> <BR> <HR ALIGN="CENTER"> <TT>I'm building an amazing FooBar with Jython by doing X, Y, and Z, and it is so easy in Jython that my boss thinks I'm a genius!</TT><BR> <HR ALIGN="CENTER"> <p>We'd love it too, if you send a short blurb about yourself, your project, or your company, so we can add it to the <a href="users.html">Jython Users</a> page. <p><li><b>Join the PSA (<i>optional</i>)</b> <p>Show you support for Python and Jython by joining the <a href="http://www.python.org/psa/">Python Software Activity</a>! </UL> <p> --- NEW FILE --- Title: Jython Home Page <p>Welcome to the Jython homepage. Jython is an implementation of the high-level, dynamic, object-oriented language <a href="http://www.python.org/">Python</a> written in 100% Pure Java, and seamlessly integrated with the <a href="http://www.javasoft.com">Java</a> platform. It thus allows you to run Python on any Java platform. <ul> <li>What is <A HREF="docs/whatis.html">Jython</A> <li><A HREF="download.html">Download</a> the lastest version. <li><A HREF="docs/index.html">Documentation</A> <li>The Jython <A HREF="docs/faq.html">FAQ</A>. </ul> <h3><em><font size=+1 color="red">Jython News</font></em></h3> <em><b>Note that these pages does not correctly reflect the current state of Jython. Most importantly, there does not yet exists a downloadable version. </b></em> <dl> <!-- <dt><b>Jython 2.0 alpha 1 released!</b> <dd>Download Jython <a href="download.html">here</a>, or <a href="NEWS">read a summary</a> of recent changes. (XX-oct-2000). --> <p><dt>Jython project announced <dd>The Jython project have started on sourceforge. Read the <a href="http://www.python.org/pipermail/jpython-interest/2000-October/006417.html"> announcement</a>. </dl> <h3><em><font size=+1 color="red">Jython In the press</font></em></h3> <dl> <dt>2000-11-08 <dd>JPython is mentioned in an <a href="http://www.javasoft.com/features/2000/11/dotnetvsms.html?frontpage-banner"> article</a> that compares the Java platform with MicroSoft's .NET </dl> --- NEW FILE --- Title: Installing Jython <H3>Installation</H1> <P>Jython is distributed as a self-extracting .class file created by <A HREF="http://liftoff.sourceforge.net">LiftOff</A>. To install Jython, open the command line to the directory in which you have placed the Jython-20a1.class file and then type: <BLOCKQUOTE> <P><java interpreter> Jython-20a1</P> </BLOCKQUOTE> <P>You will probably type one of the following three lines, depending on your system. <b>Be sure <em>not</em> to put ".class" at the end of the file name.</b> <BLOCKQUOTE> <P><TT>java Jython-20a1</TT></P> <P><TT>jre Jython-20a1</TT></P> <P><TT>jview Jython-20a1</TT> </BLOCKQUOTE> <p>It can be necessay to set the CLASSPATH to include the current directory <BLOCKQUOTE> <P><TT>env CLASSPATH=. java Jython-20a1</TT> <P><TT>java -cp . Jython-20a1</TT> <P><TT>java -classpath . Jython-20a1</TT> <P><TT>jview /cp:. Jython-20a1</TT> </BLOCKQUOTE> <P>Which command to use depends on your operating system and java version. <P>If you do not have a GUI, then add <tt>-o dir_to_install_to</tt> to the command above. Jython will install to the specified directory without bringing up the graphical installer. E.g. to install all modules to a Jython-2.0 subdirectory in the current directory do: <BLOCKQUOTE> <P><TT><java interpreter> Jython-20a1 -o Jython-2.0 demo lib source</TT> </BLOCKQUOTE> <P>After completing installation, you should be able to run Jython by typing:</P> <BLOCKQUOTE> <P><TT>jython</TT></P> </BLOCKQUOTE> <H3>What Can Go Wrong</H3> <P>You should check out this section if your Jython installation doesn't quite work right. It will contain tips for solving the most common problems. <H4>Can't Access Standard Python Modules</H4> <P>By default, Jython only installs a small collection of the standard Python modules. This is due the fact that much of the functionality of these modules is duplicated by Java packages. If you want to use parts standard Python library that are not included with Jython, you have select the "Library" during installation or add pointer in python.path to the Lib directory of a preexisting Python 2.0 distribution. This requires editing your "registry" file. <H4>Other Problems</H4> <P>Any other problems with the installation should be reported to <A HREF="mailto:pyt...@li...">jython-dev</A>. <P>As a workaround you can extract the jython-20a1.class manually. The class file is basicly a .zip file and most unzip programs can manage to extract the contents of the class into a directory. After doing that, you must <ul> <li>Remove the <tt>net</tt> directory. It isn't needed. <li>Create the startup script by hand. Use the <tt>template*</tt> files as a starting point in doing so. </ul> <H4>Platform Specific Notes</H4> <P>If all else fails, you might find that your problem is unique to your platform, and has a solution mentioned on the <A HREF="platform.html">Platform Specific Information</A> page. <p> --- NEW FILE --- Title: Platform Specific Notes</TITLE> <H2>Platform Specific Information: <I>Finding a Good JVM</I></H2> <P>Jython is 100% Pure Java and should run successfully on any bug-free fully 1.1 or 1.2 compliant JVM. Unfortunately, such a beast can sometimes be hard to find. The following is a collection of notes for getting Jython to run (and run well) on specific OS's and JVM's. Since performance can also vary considerably across JVM implementations, this page will also contain information regarding Jython's performance on different platforms. <P>This list of platform specific information is clearly incomplete. If you find this information to be incorrect for your particular platform, or if you have tips for running Jython on a platform not mentioned on this page, please send that information to <A REF="mailto:jyt...@li...">jython-dev</A>. If your platform is not included in the list below, you might be able to get useful information from SUN's <A HREF="http://www.javasoft.com/cgi-bin/java-ports.cgi"> list of third-party JVM's</A>. <H3 ALIGN="CENTER">Operating Systems</H3> <H3>Irix</H3> <H4><A HREF="http://www.sgi.com/developers/devtools/languages/java.html"> Java Development Environment 3.1.1 from SGI</A></H4> <P>Jython will work with the 3.0.1 version of the JDE (which is based on the 1.1.3 JVM), but there are a number of significant known bugs in this release. I strongly recommend using to the 3.1 release on this platform. <P> <H3>Linux</H3> <H4><A HREF="http://www.blackdown.org/java-linux.html">JDK 1.1.6 from blackdown.org</A></H4> <P>There should be no problems running Jython on this JVM. <H3>Macintosh</H3> <P>Mizutori Tetsuya has made available an application called JPython Runner to make it easier to use JPython on this system. More details on this system can be found at <A HREF="http://www.bekkoame.ne.jp/~mizutori/java/index.html#jpythonrunner"> JPython Runner for Macintosh</A>. This link also contains pointers to the lastest JVM for Macintosh. <P>Hopefully, future releases of Jython will be able to incorporate either this technology or something like it to make life easier for Macintosh users. <H3>Solaris</H3> <H4><A HREF="http://www.sun.com/solaris/jre/index.html">JRE 1.1.6 from SUN</A></H4> <P>Solaris 2.6 comes with JDK 1.1.3. The JIT compiler in this release has a number of serious bugs that can lead to confusing errors. You can type "java -version" to determine what release you have installed on your machine. While Jython will generally work with the 1.1.3 JVM, I strongly recommend that Solaris users upgrade to this latest version to avoid being bitten by hard to track down JIT related bugs. <H3>Windows NT, 95, and 98, Windows 2000</H3> <H4><A HREF="http://java.sun.com/j2se/1.3/"> JDK/JRE 1.3 from SUN</A> <I>(My recommendation for this platform)</I></H4> <P>This is amoung the fastest of the JVM's for Windows, and it also the most compatible with the official Java specification. I'd strongly encourage people to start with this VM, and only consider trying alternatives if they find performance to be a serious problem for their application. <H4><A HREF="http://www.microsoft.com/java/">JView from Microsoft</A></H4> <P>If you have IE 4.0 installed, you almost certainly already have this VM. Type "jview" at a command prompt to be sure. Note: if the copyright dates you see when you type "jview" do not include 1998, you have an older VM. Either download a recent version of IE 4.0, or download the VM directly from the site above. <P>If you want to write Jython code that takes advantage of Windows specific functionality (using win32 api's, interacting with COM objects, ...) then this VM will give you all of the platform specific functionality you could desire. <H3 ALIGN="CENTER">Cross-Platform JVM's</H3> <H3>Kaffe</H3> <P>Jython does not work with the current version available from transvirtual. This appears to be both due to some small incompatibilities between this Java VM and SUN's version, as well as at least one serious issue which is the lack of a java.math.BigInteger class -- this lack will be a problem for any VM that only implements the PersonalJava subset of the full Java spec. It should be possible to get Jython working on this VM if someone has the time to invest, please let us know if you have any success here or need any help. --- NEW FILE --- Title: Who uses Jython <h3>Who uses JPython?</h3> Here's a partial list of projects and users of Jython. If you are aware of any others, or would like to get your projects listed here, just drop us a message at jyt...@li.... |
From: Finn B. <bc...@us...> - 2000-11-12 22:45:31
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv19791 Added Files: links.h Log Message: First version. --- NEW FILE --- <!-- -*- html -*- --> <h3>Home</h3> <li><a href="./index.html">Overview</a> <li><a href="license.html">License</a> <li><a href="download.html">Jython 2.0</a> <li><a href="install.html">Installing</a> <li><a href="platform.html">JVM Compatibility</a> <h3>Resources</h3> <li><a href="applets/index.html">Applet Demos</a> <li><a href="http://sourceforge.net/mail/?group_id=12867">Mailling Lists (exit)</a> <li><a href="http://sourceforge.net/bugs/?group_id=12867">Bugs (exit)</a> <li><a href="users.html">Jython Users</a> <h3>Doc Quick Links</h3> <li><a href="docs/whatis.html">What is Jython</a> <li><a href="docs/index.html">All Documentation</a> <li><a href="docs/FAQ.html">FAQ</a> <li><a href="http://www.jpython.org/jpython-talk-1.ppt">JimH's Slides</a> <br>(PowerPoint, ~239KB) <h3>Exits</h3> <li><a href="http://www.python.org/">Python Language</a> <li><a href="http://www.python.org/psa">PSA</a> <li><a href="http://www.javasoft.com">Java Language</a> |
From: Finn B. <bc...@us...> - 2000-11-12 22:42:34
|
Update of /cvsroot/jython/htdocs In directory slayer.i.sourceforge.net:/tmp/cvs-serv19565 Log Message: start Status: Vendor Tag: start Release Tags: begin No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
From: Finn B. <bc...@us...> - 2000-11-12 22:22:09
|
Update of /cvsroot/jython/jython/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv17955 Modified Files: compile.ht differences.ht embedding.ht faq.ht index.ht interpreter.ht jarray.ht jythonc.ht properties.ht registry.ht subclassing.ht usejava.ht whatis.ht links.h Log Message: Updated to Jython. Index: compile.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/compile.ht,v retrieving revision 2.0 retrieving revision 2.1 diff -C2 -r2.0 -r2.1 *** compile.ht 1999/09/22 20:31:28 2.0 --- compile.ht 2000/11/12 22:22:06 2.1 *************** *** 1,48 **** ! Title: Compiling JPython ! <h3>Compiling JPython</h3> ! <P>Most users of JPython will never be required to look at the ! contents of the src directory, or try and recompile any of the files in the org.python package. All of these files have been precompiled in ! jpython.jar.</P> ! <P>For those people who do want to rebuild JPython from the source, for whatever reason, the following offers a few tips to keep in mind.</P> ! <P>The source to many of the classes in the org.python.parser package ! are not distributed with JPython. These classes are produced from the ! file "python.jjt" using the ! <A HREF="http://www.metamata.com/javacc/">JavaCC</A> parser generator ! tool. When rebuilding JPython from source you have two options for ! generating these classes: ! ! <OL> ! <LI>Copy all of the .class files from jpython.jar into src. Then ! only rebuild those files in packages other than ! org.python.parser. This is the recommended choice unless you ! explicitly want to experiment with the JPython ! grammar/parser. ! ! <LI>Get <A HREF="http://www.metamata.com/javacc/">JavaCC</A> ! <sup>1</sup>. ! Run jjtree on python.jjt, and then run javacc on the resulting ! python.jj. This should produce all of the required source ! files to build the org.python.parser package. ! </OL> ! ! <P></P> ! ! <P>The file in src/installer/MakeScriptAction.java is only used by the ! JPython installer. You should have no need to recompile this file ! unless you plan to build a new installer for JPython. This file ! depends on packages from ! <A HREF="http://www.installshield.com/java">InstallShield Java ! Edition</A>, and you must have this software installed and in your ! CLASSPATH before you can rebuild this file. <hr> ! <sup>1</sup>JavaCC version 0.7.1 is required. Specifically, newer ! versions of JavaCC are known to be incompatible with JPython's grammar ! file. This will be fixed in a later release. --- 1,35 ---- ! Title: Compiling Jython ! <h3>Compiling Jython</h3> ! <P>Most users of Jython will never be required to look at the ! contents of the source directories, or try and recompile any of the files in the org.python package. All of these files have been precompiled in ! jython.jar.</P> ! <P>For those people who do want to rebuild Jython from the source, for whatever reason, the following offers a few tips to keep in mind.</P> ! <P>Some of the sources in the org.python.parser package are generated ! from python.jtt file by the JavaCC parser generator. If you need to ! make changes to the grammar file you will need to download this ! <A HREF="http://www.metamata.com/javacc/">JavaCC</A> too. The generated ! files are also in the distribution, so usually this is not necessary. ! ! <P>To regenerate the parser from the grammar, run jjtree on python.jjt, ! and then run javacc on the resulting python.jj. This should produce all ! of the required source files to build the org.python.parser package. ! ! <P>If you have further interest in the Jython source and Jython's ! continued development, you can read the archives for the ! <a href="http://www.geocrawler.com/lists/3/SourceForge/7018/0/"> ! Jython-dev mailing list</a> or you can ! <a href="http://lists.sourceforge.net/mailman/listinfo/jython-dev">join</a> ! the list. + <P> + <hr> ! <sup>1</sup>JavaCC version 2.0 is used to create the generated sources ! included with the distribution. Index: differences.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/differences.ht,v retrieving revision 2.7 retrieving revision 2.8 diff -C2 -r2.7 -r2.8 *** differences.ht 2000/02/11 18:15:04 2.7 --- differences.ht 2000/11/12 22:22:06 2.8 *************** *** 1,7 **** ! Title: Differences between CPython and JPython ! <h3>Differences between CPython and JPython</h3> ! <P>CPython and JPython are two different implementations of the Python language. While a <A HREF="http://www.python.org/doc/ref">Language Reference</A> exists for the Python language, there are a number of --- 1,7 ---- ! Title: Differences between CPython and Jython ! <h3>Differences between CPython and Jython</h3> ! <P>CPython and Jython are two different implementations of the Python language. While a <A HREF="http://www.python.org/doc/ref">Language Reference</A> exists for the Python language, there are a number of *************** *** 9,34 **** following lists all known differences between the two implementations of the Python language. These differences range from the trivial -- ! JPython prints "1.0E20" where CPython prints ! "1e+020" -- to the dramatic -- everything in JPython is an instance of a class. At some point more effort should be made to separate the interesting differences from the mundane. <p>Any other differences not listed here can probably be considered a ! bug in JPython. Understand of course that CPython and JPython advance at different paces. All efforts are made to keep the two implementations in sync, but that's not always possible. <p><i>This list ! has been updated to describe the differences between JPython 1.1beta4 and ! CPython 1.5.2</i> <h3>Syntax</h3> <UL> ! <LI>JPython has a different interpretation of floating point literals. CPython doesn't allow 001.1 <I>CPython should be fixed.</I> ! <p><LI>JPython supports continue in a try clause. <I>CPython should be fixed - but don't hold your breath.</I> </UL> --- 9,34 ---- following lists all known differences between the two implementations of the Python language. These differences range from the trivial -- ! Jython prints "1.0E20" where CPython prints ! "1e+020" -- to the dramatic -- everything in Jython is an instance of a class. At some point more effort should be made to separate the interesting differences from the mundane. <p>Any other differences not listed here can probably be considered a ! bug in Jython. Understand of course that CPython and Jython advance at different paces. All efforts are made to keep the two implementations in sync, but that's not always possible. <p><i>This list ! has been updated to describe the differences between Jython-2.0 and ! CPython 2.0</i> <h3>Syntax</h3> <UL> ! <LI>Jython has a different interpretation of floating point literals. CPython doesn't allow 001.1 <I>CPython should be fixed.</I> ! <p><LI>Jython supports continue in a try clause. <I>CPython should be fixed - but don't hold your breath.</I> </UL> *************** *** 37,89 **** <UL> ! <LI>JPython string objects support full two-byte Unicode ! characters and the functions in the string module are ! Unicode-aware. <I>CPython should add Unicode support in the ! future, though the details of this are still unclear.</I> ! ! <p><li>JPython string objects have methods, providing a more ! convenient interface to most of the string module functionality. ! <i>This feature has been added to CPython and will appear in ! version CPython 1.6.</i> ! ! <p><LI>JPython formats floating point numbers differently, e.g. an upper case 'E' is used, and it switches over to E notation sooner than CPython does. <I>Both behaviors are acceptable.</I> - - <p><LI>In JPython, 0.1**4 is printed as - 1.0000000000000002E-4. In CPython, it is printed 0.0001, even - though it is not actually equal to 0.0001. <I>Both behaviors - are acceptable for now -- this is still being discussed.</I> - - <p><LI>JPython sequences support three argument - slices. i.e. range(3)[::-1] == [2,1,0]. <I>CPython should be - fixed.</I> ! <p><LI>Every object in JPython is an instance of a class -- ! there are no types in JPython. i.e. [].__class__ is a sensible ! thing to write in JPython. <I>CPython should be fixed - but don't hold your breath.</I> - - <p><LI>The .tell() method on JPython file objects returns a - Python long, while the .tell() method on CPython file objects - returns a Python int. <I>Whether or not both behaviors are - acceptable is still unclear.</I> ! <p><LI>JPython file objects are still missing some functionality -- see todo list in PyFile.java. (Hopefully in ! the near future this can be changed to read -- JPython file objects include the following extra functionality to properly ! handle non-ascii files...) <I>JPython should be fixed.</I> <p><LI>In CPython, range(0.1, 3.2) yields the surprising [0, ! 1, 2]. JPython does the right thing (reject float arguments). -- Many other functions taking int arguments have the same ! problem. <I>CPython should be fixed.</I> ! ! <p><LI>In CPython, the list.append() method takes multiple ! arguments and forms a tuple. JPython's append() method ! requires one argument only. <I>CPython should be fixed -- but ! probably won't be due to backwards compatibility.</I> <p><LI>The __name__ attribute of built-in extension modules --- 37,85 ---- <UL> ! <LI>Jython have only one string type which support full ! two-byte Unicode characters and the functions in the string ! module are Unicode-aware. The u"" string modifier is optional ! and completely ignored if specified. ! CPython-2.0 have two string types, the classic 8-bit string and ! and new unicode string which is created with the u"" string modifier. ! <I>Both behaviors are acceptable.</I> ! ! <p><li>Jython uses the character properties (isuppercase, isdecimal, ...) ! from the java platform. Java uses Unicode-2.0 and not all unicode properties ! is available through java. ! CPython-2.0 uses Unicode-3.0 and all unicode properties are available. ! About 340 of the unicode points have different properties. ! <I>Both behaviors are acceptable.</I> ! ! <p><LI>Jython formats floating point numbers differently, e.g. an upper case 'E' is used, and it switches over to E notation sooner than CPython does. <I>Both behaviors are acceptable.</I> ! <p><LI>In Jython, 0.1**4 is printed as ! 1.0000000000000002E-4. In CPython, it is printed ! 0.00010000000000000005. ! <I>Both behaviors are acceptable.</I> ! ! <p><LI>Jython sequences support three argument ! slices. i.e. range(3)[::-1] == [2,1,0]. ! <I>CPython should be fixed.</I> ! ! <p><LI>Every object in Jython is an instance of a class -- ! there are no types in Jython. i.e. [].__class__ is a sensible ! thing to write in Jython. <I>CPython should be fixed - but don't hold your breath.</I> ! <p><LI>Jython file objects are still missing some functionality -- see todo list in PyFile.java. (Hopefully in ! the near future this can be changed to read -- Jython file objects include the following extra functionality to properly ! handle non-ascii files...) <I>Jython should be fixed.</I> <p><LI>In CPython, range(0.1, 3.2) yields the surprising [0, ! 1, 2]. Jython does the right thing (reject float arguments). -- Many other functions taking int arguments have the same ! problem. <I>CPython should be fixed, but don't hold your ! breath.</I> <p><LI>The __name__ attribute of built-in extension modules *************** *** 92,125 **** <p><LI>In many cases, introspection yields different results. ! <I>Where appropriate and possible, JPython will adhere to CPython's introspection behavior. Some differences are acceptable.</I> ! <p><LI>JPython defines __debug__, but always sets it equal to ! 1. <I>JPython should implement CPython's -O option.</I> ! <p><LI>The locals() dictionary in JPython is mutable from within a function. After "def foo(x=1): locals()['x'] = 2; print x" foo() prints 1 in CPython and 2 in ! JPython. Jim thinks that JPython's behavior is better here -- but the best answer might be that locals() should be considered a read-only dictionary.<I> Proper behavior here is still unclear.</I> ! <p><LI>JPython doesn't support restricted execution mode and doesn't have the magic __builtins__ in every namespace. ! <I>JPython will probably never support restricted execution mode -- Java's security model is recommended instead.</I> ! <p><LI>JPython uses different values for the IOError argument. This causes trouble for people who unpack the value into an (errno, message) tuple. <I>Both behaviors are acceptable.</I> ! <p><LI>JPython code objects are missing other attributes -- co_code, co_consts, co_lnotab, co_names, co_nlocals, co_stacksize. <I>co_flags is now supported because the Python debugger requires it. Other attributes will probably never be ! supported in JPython due to its implementation of code objects as compiled Java bytecodes.</I> --- 88,121 ---- <p><LI>In many cases, introspection yields different results. ! <I>Where appropriate and possible, Jython will adhere to CPython's introspection behavior. Some differences are acceptable.</I> ! <p><LI>Jython defines __debug__, but always sets it equal to ! 1. <I>Jython should implement CPython's -O option.</I> ! <p><LI>The locals() dictionary in Jython is mutable from within a function. After "def foo(x=1): locals()['x'] = 2; print x" foo() prints 1 in CPython and 2 in ! Jython. Jim thinks that Jython's behavior is better here -- but the best answer might be that locals() should be considered a read-only dictionary.<I> Proper behavior here is still unclear.</I> ! <p><LI>Jython doesn't support restricted execution mode and doesn't have the magic __builtins__ in every namespace. ! <I>Jython will probably never support restricted execution mode -- Java's security model is recommended instead.</I> ! <p><LI>Jython uses different values for the IOError argument. This causes trouble for people who unpack the value into an (errno, message) tuple. <I>Both behaviors are acceptable.</I> ! <p><LI>Jython code objects are missing other attributes -- co_code, co_consts, co_lnotab, co_names, co_nlocals, co_stacksize. <I>co_flags is now supported because the Python debugger requires it. Other attributes will probably never be ! supported in Jython due to its implementation of code objects as compiled Java bytecodes.</I> *************** *** 127,136 **** objects may raise <tt>AttributeError</tt> or <tt>TypeError</tt> differently. <i>This is considered ! implementation dependent. In JPython the following rules are used: when getting a non-existant attribute, <tt>AttributeError</tt> is raised; when setting or deleting a readonly attribute, <tt>TypeError</tt> is raised; when setting or deleting a non-existant attribute, <tt>AttributeError</tt> ! is raised. Be aware though currently neither JPython nor CPython are completely consistent.</i> --- 123,132 ---- objects may raise <tt>AttributeError</tt> or <tt>TypeError</tt> differently. <i>This is considered ! implementation dependent. In Jython the following rules are used: when getting a non-existant attribute, <tt>AttributeError</tt> is raised; when setting or deleting a readonly attribute, <tt>TypeError</tt> is raised; when setting or deleting a non-existant attribute, <tt>AttributeError</tt> ! is raised. Be aware though currently neither Jython nor CPython are completely consistent.</i> *************** *** 138,165 **** func_defaults attributes. <i>While these are writable in CPython, I haven't decided whether they should be writable in ! JPython.</i> ! <p><LI>JPython has "true" garbage collection whereas ! CPython uses reference counting. This means that in JPython users don't need to worry about handling circular references as these are guaranteed to be collected properly. On the ! other hand, users of JPython have no guarantees of when an object will be finalized -- this can cause problems for people who use open("foo", 'r').read() excessively. <I>Both behaviors are acceptable -- and highly unlikely to change.</I> - <p><LI>In JPython, __del__() methods in user-defined classes - are never called. <i>Some future version of JPython might - provide limited support for __del__(), but see the above - item.</i> - <p><LI>The dictionaries used by classes, instances, and ! modules in JPython are not the same as the dictionaries created by {}. They are StringMap's which require all of their keys to be strings. After "class c: pass", c.__dict__[1] = 2 will work in CPython, but will raise a "TypeError: keys in namespace must be strings" error ! in JPython. <I>Both behaviors are acceptable -- CPython might ! adopt JPython's approach in the future for the performance gains it can provide.</I> --- 134,156 ---- func_defaults attributes. <i>While these are writable in CPython, I haven't decided whether they should be writable in ! Jython.</i> ! <p><LI>Jython has "true" garbage collection whereas ! CPython uses reference counting. This means that in Jython users don't need to worry about handling circular references as these are guaranteed to be collected properly. On the ! other hand, users of Jython have no guarantees of when an object will be finalized -- this can cause problems for people who use open("foo", 'r').read() excessively. <I>Both behaviors are acceptable -- and highly unlikely to change.</I> <p><LI>The dictionaries used by classes, instances, and ! modules in Jython are not the same as the dictionaries created by {}. They are StringMap's which require all of their keys to be strings. After "class c: pass", c.__dict__[1] = 2 will work in CPython, but will raise a "TypeError: keys in namespace must be strings" error ! in Jython. <I>Both behaviors are acceptable -- CPython might ! adopt Jython's approach in the future for the performance gains it can provide.</I> *************** *** 169,194 **** <UL> ! <LI>JPython supports all Java packages as extension modules. i.e. from "java.lang import System" will ! work in any JPython implementation. <I>This functionality might be added as an optional extension to some future version of CPython.</I> ! <p><LI>JPython includes the builtin module <tt>jarray</tt> -- which allows Python programmers to create and manipulate Java array objects. ! <p><LI>Lots of builtin extension modules don't exist in JPython. <UL> ! <LI>Modules struct, cPickle, cStringIO, and operator were ! all added for JPython v1.1. The following are likely to ! be implemented in a future version of JPython -- cmath. ! ! <p><LI>The following are under consideration (working code would make the decision much easier ;-) -- array, select, ! a dbm/gdbm/bsddb style module, Numeric. <p><LI>The following are highly unlikely any time soon -- ! Tkinter. However, Finn Bock has a JNI implementation called <a href="http://jTkinter.sourceforge.net/">jTkinter</a> which supports the full _tkinter API. Very cool stuff! --- 160,181 ---- <UL> ! <LI>Jython supports all Java packages as extension modules. i.e. from "java.lang import System" will ! work in any Jython implementation. <I>This functionality might be added as an optional extension to some future version of CPython.</I> ! <p><LI>Jython includes the builtin module <tt>jarray</tt> -- which allows Python programmers to create and manipulate Java array objects. ! <p><LI>Some builtin extension modules don't exist in Jython. <UL> ! <LI>The following are under consideration (working code would make the decision much easier ;-) -- array, select, ! a dbm/gdbm/bsddb style module, Numeric, cmath. <p><LI>The following are highly unlikely any time soon -- ! win32com and Tkinter. However, Finn Bock has a JNI implementation called <a href="http://jTkinter.sourceforge.net/">jTkinter</a> which supports the full _tkinter API. Very cool stuff! *************** *** 198,214 **** </UL> - <p><LI>__builtin__ module - <UL> - <p><LI>Incomplete implementation of __import__ -- only one - argument is allowed and replacing this with a user-defined - function has no effect. <I>JPython might be fixed in a - future release, but CPython will probably adopt a new - import mechanism in the near future, so JPython may not - change until the new mechanism is defined.</I> - </UL> - <p><LI>os module <UL> ! <LI>popen() and system() are missing. <I>JPython should be fixed, patches would be graciously accepted.</I> --- 185,191 ---- </UL> <p><LI>os module <UL> ! <LI>popen() and system() are missing. <I>Jython should be fixed, patches would be graciously accepted.</I> *************** *** 234,241 **** <UL> ! <p><LI>JPython is still missing exitfunc <p><LI>Also missing executable, getrefcount, ! setcheckinterval which don't make much sense for JPython. </UL> --- 211,218 ---- <UL> ! <p><LI>Jython is still missing exitfunc <p><LI>Also missing executable, getrefcount, ! setcheckinterval which don't make much sense for Jython. </UL> *************** *** 244,249 **** <UL> <p><LI>CPython's thread modules defines some aliases that ! JPython's doesn't. <I>These aliases are considered ! obsolete and won't be supported by JPython.</I> </UL> --- 221,226 ---- <UL> <p><LI>CPython's thread modules defines some aliases that ! Jython's doesn't. <I>These aliases are considered ! obsolete and won't be supported by Jython.</I> </UL> *************** *** 260,267 **** <UL> ! <p><LI>JPython doesn't catch interrupts. <I>Only fixable with a GUI console since interrupts are not supported by Java.</I> ! <p><LI>JPython doesn't have command line editing. <I>Only fixable with a GUI console. However, Un*x users can check out <tt>rlterm</tt> which provides generic GNU Readline support --- 237,244 ---- <UL> ! <p><LI>Jython doesn't catch interrupts. <I>Only fixable with a GUI console since interrupts are not supported by Java.</I> ! <p><LI>Jython doesn't have command line editing. <I>Only fixable with a GUI console. However, Un*x users can check out <tt>rlterm</tt> which provides generic GNU Readline support *************** *** 270,278 **** <a href="ftp://ftp-icf.llnl.gov/pub/Yorick/">Yorick</a> package.</I> ! <p><LI>JPython should have a feature similar to $PYTHONSTARTUP, which specifies a script to run at the start of interactive mode only. ! <p><LI>JPython supports <a href="interpreter.html">different command line options</a> than CPython, e.g. "-jar" and "-D". It --- 247,255 ---- <a href="ftp://ftp-icf.llnl.gov/pub/Yorick/">Yorick</a> package.</I> ! <p><LI>Jython should have a feature similar to $PYTHONSTARTUP, which specifies a script to run at the start of interactive mode only. ! <p><LI>Jython supports <a href="interpreter.html">different command line options</a> than CPython, e.g. "-jar" and "-D". It Index: embedding.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/embedding.ht,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** embedding.ht 1999/06/03 20:43:56 1.1 --- embedding.ht 2000/11/12 22:22:06 1.2 *************** *** 1,10 **** ! Title: Embedding JPython ! <h3>Embedding JPython</h3> ! <P>There are several options for embedding JPython in a Java application. Sometimes the nicest approach is to make a real Java class out of a Python class and then just use that Python class from ! Java code. The simplest approach to embedding JPython is to use the PythonInterpreter object.</P> --- 1,10 ---- ! Title: Embedding Jython ! <h3>Embedding Jython</h3> ! <P>There are several options for embedding Jython in a Java application. Sometimes the nicest approach is to make a real Java class out of a Python class and then just use that Python class from ! Java code. The simplest approach to embedding Jython is to use the PythonInterpreter object.</P> Index: faq.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/faq.ht,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** faq.ht 2000/01/22 00:50:29 2.9 --- faq.ht 2000/11/12 22:22:06 2.10 *************** *** 1,5 **** ! Title: JPython FAQ ! <h3>The JPython FAQ</h3> <ol> --- 1,5 ---- ! Title: Jython FAQ ! <h3>The Jython FAQ</h3> <ol> *************** *** 14,31 **** JPython. ! <p><li><b>Is JPython the same language as Python?</b> ! <P>We will always strive to ensure that JPython remains as compatible with CPython as possible. Nevertheless, there are a number of <a href="differences.html">differences</a> between the two implementations that are ! unlikely to go away. These range from the trivial - JPython's code objects don't have a co_code attribute because they don't ! have any Python bytecodes; to the significant - JPython uses Java's true garbage collection rather than Python's reference counting scheme. <P>Python has never really had much of a language definition ! beyond it's C-based implementation. The existence of JPython changed that for the first time and will hopefully lead to a much clearer sense of what Python the language is; independent of any --- 14,43 ---- JPython. ! <p><li><b>What is Jython?</b> ! ! <p>Jython is the successor to JPython. The Jython project was ! created in accordance with the CNRI JPython 1.1.x license, in ! order to ensure the continued existence and development of this ! important piece of Python software. The intent is to manage this ! project with the same open policies that are serving CPython so well. ! ! <p>Mailing lists, CVS and all current information on the Jython ! project is available at SourceForge, at ! <a href="http://sourceforge.net/projects/jython">The Jython project</a>. ! ! <p><li><b>Is Jython the same language as Python?</b> ! <P>We will always strive to ensure that Jython remains as compatible with CPython as possible. Nevertheless, there are a number of <a href="differences.html">differences</a> between the two implementations that are ! unlikely to go away. These range from the trivial - Jython's code objects don't have a co_code attribute because they don't ! have any Python bytecodes; to the significant - Jython uses Java's true garbage collection rather than Python's reference counting scheme. <P>Python has never really had much of a language definition ! beyond it's C-based implementation. The existence of Jython changed that for the first time and will hopefully lead to a much clearer sense of what Python the language is; independent of any *************** *** 38,55 **** <p><li><b>What is the current status of JPython?</b> ! <p>JPython 1.1rc1 was released on 21-Jan-2000, with the final ! release expected before the ! <a href="http://www.python.org/workshops/2000-01/">8th ! International Python Conference</a>. Check the ! <a href="http://www.jpython.org">www.jpython.org</a> site for the ! most current release. ! Jim Hugunin, JPython's author, has moved out to sunny ! California to work on Xerox PARC's ! <a href="http://www.parc.xerox.com/spl/projects/aop/">AspectJ</a> ! language. JPython continues to be maintained by Barry Warsaw at ! CNRI, with help and input from Python's author Guido van Rossum, ! other CNRI folks, and the many contributors on the ! <a href="http://www.python.org/mailman/listinfo/jpython-interest"> ! JPython-Interest</a> mailing list. <p><li><b>JPython and Y2K</b> --- 50,59 ---- <p><li><b>What is the current status of JPython?</b> ! <p>JPython 1.1 was released on 28-Jan-2000. Since then, there have ! been no further developments on JPython. ! ! <p><li><b>What is the current status of Jython?</b> ! <p>The Jython project was announced on 19-oct-2000. A release of ! jython-2.0 is planned before the end of the year. <p><li><b>JPython and Y2K</b> *************** *** 59,66 **** <a href="http://www.python.org/cgi-bin/faqw.py?querytype=anykeywords&casefold=yes&req=search&query=y2k"> Python FAQ entry on the subject</a>, with the additional caveat ! that JPython is of course dependent on any Y2K issues associated with the underlying JVM and Java class libraries you're using. However, you can essentially apply the Python Y2K stance to ! JPython by, e.g. substituting the word "Java" for "C" in FAQ question 4.65 (<em>ignore the clip from the Python copyright notice</em>). --- 63,70 ---- <a href="http://www.python.org/cgi-bin/faqw.py?querytype=anykeywords&casefold=yes&req=search&query=y2k"> Python FAQ entry on the subject</a>, with the additional caveat ! that Jython is of course dependent on any Y2K issues associated with the underlying JVM and Java class libraries you're using. However, you can essentially apply the Python Y2K stance to ! Jython by, e.g. substituting the word "Java" for "C" in FAQ question 4.65 (<em>ignore the clip from the Python copyright notice</em>). *************** *** 69,73 **** library are supported?</b> ! <P>The good news is that JPython now supports the large majority of the standard Python library. The bad news is that this has moved so rapidly, it's hard to keep the documentation up to --- 73,77 ---- library are supported?</b> ! <P>The good news is that Jython now supports the large majority of the standard Python library. The bad news is that this has moved so rapidly, it's hard to keep the documentation up to *************** *** 75,79 **** <p>Built-in modules (e.g. those that are written in C for CPython) ! are a differnet story. These would have to be ported to Java, or implemented with a JNI bridge in order to be used by JPython. Some built-in modules have been ported to JPython, most notably --- 79,83 ---- <p>Built-in modules (e.g. those that are written in C for CPython) ! are a different story. These would have to be ported to Java, or implemented with a JNI bridge in order to be used by JPython. Some built-in modules have been ported to JPython, most notably *************** *** 89,95 **** <P>If there is some standard Python module that you have a real need for that doesn't work with JPython yet, please ! <a href="mailto:jp...@py...">send us mail</a>. ! <p><li><b>How fast is JPython?</b> <p>At <a href="http://www.python.org/workshops/1997-10/">IPC-6</a> --- 93,99 ---- <P>If there is some standard Python module that you have a real need for that doesn't work with JPython yet, please ! <a href="mailto:jyt...@li...">send us mail</a>. ! <p><li><b>How fast is Jython?</b> <p>At <a href="http://www.python.org/workshops/1997-10/">IPC-6</a> *************** *** 99,114 **** CPython is 1.5.2 which might be only slightly faster than 1.5. JimH re-ran his benchmark tests against CPython 1.5 and his then ! current release of JPython, finding that JPython was about 2.5x slower than CPython 1.5. I have recently run a few informal benchmarks and found some interesting numbers: using Sun's JDK ! 1.2.1 with JIT on a Solaris 2.6 Sparc Ultra 2, I found JPython 1.1beta3 to produce pystone numbers equal to (or very slightly better than) CPython 1.5.2+. <p>The problem, of course, is that JITs are still not reliable ! enough for JPython. Turning off the JIT on the above platform, ! can slow JPython down by a factor of 10. ! <P>The speed of JPython is tied very tightly to the speed of the underlying JVM. The benchmark results that JimH reported were all using Microsoft's JVM from Internet Explorer 4.0. The next --- 103,118 ---- CPython is 1.5.2 which might be only slightly faster than 1.5. JimH re-ran his benchmark tests against CPython 1.5 and his then ! current release of Jython, finding that Jython was about 2.5x slower than CPython 1.5. I have recently run a few informal benchmarks and found some interesting numbers: using Sun's JDK ! 1.2.1 with JIT on a Solaris 2.6 Sparc Ultra 2, I found Jython 1.1beta3 to produce pystone numbers equal to (or very slightly better than) CPython 1.5.2+. <p>The problem, of course, is that JITs are still not reliable ! enough for Jython. Turning off the JIT on the above platform, ! can slow Jython down by a factor of 10. ! <P>The speed of Jython is tied very tightly to the speed of the underlying JVM. The benchmark results that JimH reported were all using Microsoft's JVM from Internet Explorer 4.0. The next *************** *** 119,133 **** <P>Finally, pystone is not the last word in benchmarking. At the ! moment I'm more concerned with making JPython complete and correct than with performance. We will continually be revisiting performance issues both to examine better benchmark's for ! comparing JPython and CPython (as well as other scripting ! languages for the JVM) and work at optimizing JPython's performance. ! <p><li><b>Why do weird things sometimes happen in JPython?</b> <p>More likely than not, the problem is with the JIT ! (Just-in-time) compiler your JVM is using. JPython acts like a bizarre Java compiler, taking Python source code and emitting Java bytecode. It's bizarre because the emitted bytecode --- 123,137 ---- <P>Finally, pystone is not the last word in benchmarking. At the ! moment I'm more concerned with making Jython complete and correct than with performance. We will continually be revisiting performance issues both to examine better benchmark's for ! comparing Jython and CPython (as well as other scripting ! languages for the JVM) and work at optimizing Jython's performance. ! <p><li><b>Why do weird things sometimes happen in Jython?</b> <p>More likely than not, the problem is with the JIT ! (Just-in-time) compiler your JVM is using. Jython acts like a bizarre Java compiler, taking Python source code and emitting Java bytecode. It's bizarre because the emitted bytecode *************** *** 137,142 **** stuff happen, or weird bugs, the first thing to do is to turn off your JIT and try again. If the bug still exists with the JIT ! turned off then consider <a href="http://www.python.org/jpython-bugs"> ! submitting a bug report</a>. <p><li><b>Why did I get an OutOfMemoryError?</b> --- 141,147 ---- stuff happen, or weird bugs, the first thing to do is to turn off your JIT and try again. If the bug still exists with the JIT ! turned off then consider ! <a href="http://sourceforge.net/bugs/?group_id=12867">submitting a ! bug report</a>. <p><li><b>Why did I get an OutOfMemoryError?</b> *************** *** 164,168 **** (i.e. <tt>jview.exe</tt>) which provides the standard classes in a different format. You need to run the following command in a ! console window before using JPython: <pre> --- 169,173 ---- (i.e. <tt>jview.exe</tt>) which provides the standard classes in a different format. You need to run the following command in a ! console window before using Jython: <pre> *************** *** 170,176 **** </pre> ! <p><li><b>Semantic Differences between JPython and CPython</b> ! <P>There are several several differences between JPython and CPython that wil probably never go away. These differences are primarily related to underlying differences between the C and Java --- 175,181 ---- </pre> ! <p><li><b>Semantic Differences between Jython and CPython</b> ! <P>There are several several differences between Jython and CPython that wil probably never go away. These differences are primarily related to underlying differences between the C and Java *************** *** 181,190 **** <p><UL> ! <LI><em>JPython has true garbage collection - CPython uses reference counting.</em> ! <br>This means that in JPython users don't need to worry about creating circular references as these are guarnteed to be ! collected properly. On the other hand, users of JPython have no guarantees of when an object will be finalized (short of calling System.gc() to force garbage collection). --- 186,195 ---- <p><UL> ! <LI><em>Jython has true garbage collection - CPython uses reference counting.</em> ! <br>This means that in Jython users don't need to worry about creating circular references as these are guarnteed to be ! collected properly. On the other hand, users of Jython have no guarantees of when an object will be finalized (short of calling System.gc() to force garbage collection). *************** *** 196,200 **** ever called. ! <p><LI><em>Control-C can not be caught by JPython, but will exit the shell completely</em> </UL> --- 201,205 ---- ever called. ! <p><LI><em>Control-C can not be caught by Jython, but will exit the shell completely</em> </UL> *************** *** 202,206 **** <p><li><b>Why can't I multiply inherit from two Java classes?</b> ! <P>In an earlier version of JPython, you actually could. This was deliberately disabled in 1.1 for a variety of good reasons. For a detailed discussion on this issue see the following archive --- 207,211 ---- <p><li><b>Why can't I multiply inherit from two Java classes?</b> ! <P>In earlier versions of JPython, you actually could. This was deliberately disabled in 1.1 for a variety of good reasons. For a detailed discussion on this issue see the following archive Index: index.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/index.ht,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** index.ht 1999/06/28 15:38:34 1.2 --- index.ht 2000/11/12 22:22:06 1.3 *************** *** 1,8 **** ! Title: Overview of JPython documentation ! <h3>Overview of JPython Documentation</h3> <P>There is a variety of documentation available to help you learn to ! use JPython. We will be expanding this information in the future so check back here often. You can use the sidebar you see on the left side of this page as a table of contents to easily jump to the --- 1,8 ---- ! Title: Overview of Jython documentation ! <h3>Overview of Jython Documentation</h3> <P>There is a variety of documentation available to help you learn to ! use Jython. We will be expanding this information in the future so check back here often. You can use the sidebar you see on the left side of this page as a table of contents to easily jump to the *************** *** 10,39 **** these links is provided below. ! <h3>JPython Specific Documentation</h3> ! The following documentation is specific to JPython: <ul> ! <li>For a one-page introduction to what JPython is, and why you should care, check out <A HREF="whatis.html"><em>What is ! JPython?</em></A>. <li>Here is information on <a href="interpreter.html">invoking the ! JPython interpreter</a> by typing <em>jpython</em> at the shell prompt. ! <li>The <a href="registry.html">JPython registry</a> replaces environment variables for <code>PYTHONPATH</code> and more. <li>The <a href="embedding.html">embedding</a> document describes ! how to call JPython from a Java application. <li>You might also be interested in <a ! href="compile.html">building JPython from the source code</a>. </ul> <h3>Interaction with Java Packages</h3> ! Most JPython applications will want to use the vast array of Java packages available. The following documentation helps you work with Java packages. --- 10,39 ---- these links is provided below. ! <h3>Jython Specific Documentation</h3> ! The following documentation is specific to Jython: <ul> ! <li>For a one-page introduction to what Jython is, and why you should care, check out <A HREF="whatis.html"><em>What is ! Jython?</em></A>. <li>Here is information on <a href="interpreter.html">invoking the ! Jython interpreter</a> by typing <em>jython</em> at the shell prompt. ! <li>The <a href="registry.html">Jython registry</a> replaces environment variables for <code>PYTHONPATH</code> and more. <li>The <a href="embedding.html">embedding</a> document describes ! how to call Jython from a Java application. <li>You might also be interested in <a ! href="compile.html">building Jython from the source code</a>. </ul> <h3>Interaction with Java Packages</h3> ! Most Jython applications will want to use the vast array of Java packages available. The following documentation helps you work with Java packages. *************** *** 51,55 **** <a href="subclassing.html">subclass Java classes in Python</a>. ! <li>The <a href="jpythonc.html">jpythonc</a> utility compiles Python source code to real Java classes, and is used for building applets, servlets, beans, etc. --- 51,55 ---- <a href="subclassing.html">subclass Java classes in Python</a>. ! <li>The <a href="jythonc.html">jythonc</a> utility compiles Python source code to real Java classes, and is used for building applets, servlets, beans, etc. *************** *** 58,66 **** <h3>General Python Documentation</h3> ! <P>While JPython has only been publically available for eight months, the Python language has been around for many years. The majority of the <A HREF="http://www.python.org/doc/">standard Python ! documentation</A> applies to JPython. A few very handy places to look are:</P> --- 58,66 ---- <h3>General Python Documentation</h3> ! <P>While Jython has only been publically available for eight months, the Python language has been around for many years. The majority of the <A HREF="http://www.python.org/doc/">standard Python ! documentation</A> applies to Jython. A few very handy places to look are:</P> *************** *** 72,76 **** Library Reference</A>. Although many of these modules are not yet implemented (those coded in C for CPython must be ! re-implemented in Java for JPython), experience Python programmers keep the Library Reference Manual under their pillow for easy access. --- 72,76 ---- Library Reference</A>. Although many of these modules are not yet implemented (those coded in C for CPython must be ! re-implemented in Java for Jython), experience Python programmers keep the Library Reference Manual under their pillow for easy access. *************** *** 80,84 **** <ul> ! <li>JPython and CPython are two different implementations of the same language. There are naturally some differences between the two implementations, sometimes reflecting undefined --- 80,84 ---- <ul> ! <li>Jython and CPython are two different implementations of the same language. There are naturally some differences between the two implementations, sometimes reflecting undefined *************** *** 86,97 **** the independent implementations. Here is a more detailed discussion and <a href="differences.html">comparision of ! JPython and CPython</a>. ! <li>The <a href="faq.html">JPython FAQ</a> may already contain the answer to your question... <li>...and if it doesn't, then the ! <a href="http://www.python.org/pipermail/jpython-interest/"> ! JPython-interest mailing list archives</a> might help. <li>You might also be interested in reading --- 86,97 ---- the independent implementations. Here is a more detailed discussion and <a href="differences.html">comparision of ! Jython and CPython</a>. ! <li>The <a href="faq.html">Jython FAQ</a> may already contain the answer to your question... <li>...and if it doesn't, then the ! <a href="http://www.geocrawler.com/archives/3/7017/2000/"> ! Jython-users mailing list archives</a> might help. <li>You might also be interested in reading *************** *** 107,114 **** <UL> ! <LI>The <A HREF="http://www.python.org/mailman/listinfo/jpython-interest"> ! jpython-interest</A> mailing list. <LI>The <A HREF="news:comp.lang.python">comp.lang.python</A> newsgroup. ! <LI>JPython's developers, who can be reached at ! <A HREF="mailto:jp...@py...">jp...@py...</A>. </UL> --- 107,114 ---- <UL> ! <LI>The <A HREF="http://lists.sourceforge.net/mailman/listinfo/jython-users"> ! jython-users</A> mailing list. <LI>The <A HREF="news:comp.lang.python">comp.lang.python</A> newsgroup. ! <LI>Jython's developers, who can be reached at ! <A HREF="mailto:jyt...@li...">jyt...@li...</A>. </UL> Index: interpreter.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/interpreter.ht,v retrieving revision 2.1 retrieving revision 2.2 diff -C2 -r2.1 -r2.2 *** interpreter.ht 1999/06/17 16:04:05 2.1 --- interpreter.ht 2000/11/12 22:22:06 2.2 *************** *** 1,10 **** ! Title: Invoking the JPython Interpreter ! <h3>Invoking the JPython Interpreter</h3> ! <P>JPython can be invoked from the shell using the following command:</P> <pre> ! jpython [options] [-jar jar | -c cmd | file | -] [args] </pre> --- 1,10 ---- ! Title: Invoking the Jython Interpreter ! <h3>Invoking the Jython Interpreter</h3> ! <P>Jython can be invoked from the shell using the following command:</P> <pre> ! jython [options] [-jar jar | -c cmd | file | -] [args] </pre> *************** *** 19,27 **** <td>don't imply <em>import site</em> on initialization </tr><tr> - <td><b>-X</b></td> - <td>disable class based standard exceptions - </tr><tr> <td><b>-D<em>prop</em>=<em>value</em></b></td> ! <td>Set the Java property <em>prop</em> to <em>value</em></td> </tr><tr> <td><b>-jar <em>jar</em></b></td> --- 19,24 ---- <td>don't imply <em>import site</em> on initialization </tr><tr> <td><b>-D<em>prop</em>=<em>value</em></b></td> ! <td>Set the jython property <em>prop</em> to <em>value</em></td> </tr><tr> <td><b>-jar <em>jar</em></b></td> *************** *** 39,44 **** <td>program is read from standard-in (default; interactive mode is used if on a tty). This flag allows you to pipe a file into ! JPython and have it be treated correctly. This would be useful ! in a case like: <tt>filter file | jpython -</tt> </tr><tr> <td><b>--help</b></td> --- 36,41 ---- <td>program is read from standard-in (default; interactive mode is used if on a tty). This flag allows you to pipe a file into ! Jython and have it be treated correctly. This would be useful ! in a case like: <tt>filter file | jython -</tt> </tr><tr> <td><b>--help</b></td> *************** *** 46,50 **** </tr><tr> <td><b>--version</b></td> ! <td>print JPython version number and exit </tr><tr> <td><b><em>args</em></b></td> --- 43,47 ---- </tr><tr> <td><b>--version</b></td> ! <td>print Jython version number and exit </tr><tr> <td><b><em>args</em></b></td> *************** *** 55,77 **** <H3>Details</H3> ! <P><tt>jpython</tt> is a short script that invokes your local JVM, sets the Java property <tt>install.path</tt> to an appropriate value, and then runs the Java classfile ! <tt>org.python.util.jpython</tt>.</P> ! <H3>Making JPython Scripts Executable</H3> ! <P>To make a jpython ".py" file executable on a Unix system you can add the following line to the top of the file: ! <PRE><B>#! /usr/bin/env jpython</B></PRE> ! <P>For this magic to work, you must have <tt>jpython</tt> somewhere on your standard PATH. You also must also make the ".py" file executable. Typically this is done with the command: <TT>chmod +x foo.py</TT>. ! <p><I>Note: "#! <...>/jpython" will probably not work to ! make your script executable. This is because "jpython" is itself a script, and the #! magic requires that the file to execute is a binary executable on most Unix variants. Using --- 52,74 ---- <H3>Details</H3> ! <P><tt>jython</tt> is a short script that invokes your local JVM, sets the Java property <tt>install.path</tt> to an appropriate value, and then runs the Java classfile ! <tt>org.python.util.jython</tt>.</P> ! <H3>Making Jython Scripts Executable</H3> ! <P>To make a jython ".py" file executable on a Unix system you can add the following line to the top of the file: ! <PRE><B>#! /usr/bin/env jython</B></PRE> ! <P>For this magic to work, you must have <tt>jython</tt> somewhere on your standard PATH. You also must also make the ".py" file executable. Typically this is done with the command: <TT>chmod +x foo.py</TT>. ! <p><I>Note: "#! <...>/jython" will probably not work to ! make your script executable. This is because "jython" is itself a script, and the #! magic requires that the file to execute is a binary executable on most Unix variants. Using Index: jarray.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/jarray.ht,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** jarray.ht 1999/06/03 20:43:57 1.1 --- jarray.ht 2000/11/12 22:22:06 1.2 *************** *** 1,21 **** ! Title: Java Arrays in JPython ! <h3>Java Arrays in JPython - JArray</h3> Many Java methods require Java array objects as arguments. The way that these arguments are used means that they must correspond to ! fixed-length, mutable sequences, so'metimes of primitive data types. The PyArray class is added to support these Java arrays and instances of this class will be automatically returned from any Java method call that produces an array. In addition, the "jarray" module is provided ! to allow users of JPython to create these arrays themselves, primarily for the purpose of passing them to a Java method. <P>The jarray module exports two functions: ! <pre> array(sequence, type) zeros(length, type) ! </pre> <P>array will create a new array of the same length as the input --- 1,21 ---- ! Title: Java Arrays in Jython ! <h3>Java Arrays in Jython - JArray</h3> Many Java methods require Java array objects as arguments. The way that these arguments are used means that they must correspond to ! fixed-length, mutable sequences, sometimes of primitive data types. The PyArray class is added to support these Java arrays and instances of this class will be automatically returned from any Java method call that produces an array. In addition, the "jarray" module is provided ! to allow users of Jython to create these arrays themselves, primarily for the purpose of passing them to a Java method. <P>The jarray module exports two functions: ! <blockquote><pre> array(sequence, type) zeros(length, type) ! </pre></blockquote> <P>array will create a new array of the same length as the input Index: jythonc.ht =================================================================== RCS file: /cvsroot/jython/jython/Doc/jythonc.ht,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** jythonc.ht 2000/01/17 21:35:25 2.3 --- jythonc.ht 2000/11/12 22:22:06 2.4 *************** *** 1,34 **** ! Title: Compiling Python Source to Real Java Classes ! <h3>Compiling Python Source to Real Java Classes - jpythonc</h3> <P>The previous section describes how Python classes can be created that subclass from Java classes. This works very well when you want ! to pass a Python class into Java from JPython. This is not adequate for building real Java ".class" files that implement a Java class and can be passed directly to Java programs. This sort of functionality ! is required to build applets, servlets, or JavaBeans in JPython that can be used exactly like their Java equivalents. It is also very valuable for users who wish to subclass Python classes in Java.</P> <P>In order to build a real java class from a Python class, you will ! use the <tt>jpythonc</tt> tool. A script called "jpythonc" should ! have been installed in the JPython installation directory when you installed the package. If it was not, it can be invoked as follows: ! "jpython Tools\jpythonc\jpythonc.py".</P> ! <p>JPython 1.1 has a new version of the jpythonc tool, which generates ! actual Java source code, and then invokes a Java compiler over this ! source code to create the .class files. Thus, you will need access to ! a Java compiler in order to use jpythonc. It is recommended that you ! use Sun's standard <tt>javac</tt> compiler, or IBM's excellent ! <tt>jikes</tt> compiler. Specifically, the Microsoft SDK <tt>jvc</tt> ! compiler is not recommended. ! <P>Invoke jpythonc like this: ! <P><B>jpythonc [options] [module]*</b> ! <p>Options are given in the table below. Note that jpythonc now uses the standard Python <tt>getopt</tt> module, meaning that both long and short forms of the options are available. The old option names still --- 1,34 ---- ! Title: Using the Jython compiler - jythonc ! <h3>Compiling Python Source to Real Java Classes</h3> <P>The previous section describes how Python classes can be created that subclass from Java classes. This works very well when you want ! to pass a Python class into Java from Jython. This is not adequate for building real Java ".class" files that implement a Java class and can be passed directly to Java programs. This sort of functionality ! is required to build applets, servlets, or JavaBeans in Jython that can be used exactly like their Java equivalents. It is also very valuable for users who wish to subclass Python classes in Java.</P> <P>In order to build a real java class from a Python class, you will ! use the <tt>jythonc</tt> tool. A script called "jythonc" should ! have been installed in the Jython installation directory when you installed the package. If it was not, it can be invoked as follows: ! "jython Tools\jythonc\jythonc.py".</P> ! <p>The jythonc tool generates actual Java source code, and then ! invokes a Java compiler over this source code to create the .class ! files. Thus, you will need access to a Java compiler in order to use ! jythonc. ! It is recommended that you use Sun's standard <tt>javac</tt> compiler, ! or IBM's excellent <tt>jikes</tt> compiler. ! Specifically, the Microsoft SDK <tt>jvc</tt> compiler is not recommended. ! <P>Invoke jythonc like this: ! <P><B>jythonc [options] [module]*</b> ! <p>Options are given in the table below. Note that jythonc now uses the standard Python <tt>getopt</tt> module, meaning that both long and short forms of the options are available. The old option names still *************** *** 62,66 **** <br><b>-c</b> <br><font size=-1 color="blue"><b>-core</b></font> ! </td><TD>Include the core JPython libraries (about 130K). Needed for applets since Netscape doesn't yet support multiple archives. Implies the <b>--deep</b> option. --- 62,66 ---- <br><b>-c</b> <br><font size=-1 color="blue"><b>-core</b></font> ! </td><TD>Include the core Jython libraries (about 130K). Needed for applets since Netscape doesn't yet support multiple archives. Implies the <b>--deep</b> option. *************** *** 69,73 **** <br><b>-a</b> <br><font size=-1 color="blue"><b>-all</b></font> ! </td><TD>Include all of the JPython libraries (everything in core + compiler and parser). Implies the <b>--deep</b> option. </TR><TR> --- 69,73 ---- <br><b>-a</b> <br><font size=-1 color="blue"><b>-all</b></font> ! </td><TD>Include all of the Jython libraries (everything in core + compiler and parser). Implies the <b>--deep</b> option. </TR><TR> *************** *** 84,88 **** </td><td>Include Java dependencies from this list of packages. Default is <tt>org.python.modules</tt> and ! <tt>com.oroinc.text.regex</tt>. </TR><TR> <TD><B>--workdir</B> <em>directory</em> --- 84,88 ---- </td><td>Include Java dependencies from this list of packages. Default is <tt>org.python.modules</tt> and ! <tt>org.apache.oro.text.regex</tt>. </TR><TR> <TD><B>--workdir</B> <em>directory</em> *************** *** 105,109 **** is set to "NONE" then compile ends with the generation of the Java source file. Alternatively, you can set the property ! <tt>python.jpythonc.compiler</tt> in the <a href="registry.html">registry</a>. </tr><tr> --- 105,109 ---- is set to "NONE" then compile ends with the generation of the Java source file. Alternatively, you can set the property ! <tt>python.jythonc.compiler</tt> in the <a href="registry.html">registry</a>. </tr><tr> *************** *** 112,116 **** </td><td>Options passed directly to the Java compiler. Alternatively, you can set the property ! <tt>python.jpythonc.compileropts</tt> in the <a href="registry.html">registry</a>. </tr><tr> --- 112,116 ---- </td><td>Options passed directly to the Java compiler. Alternatively, you can set the property ! <tt>python.jythonc.compileropts</tt> in the <a href="registry.html">registry</a>. </tr><tr> *************** *** 131,164 **** </TABLE> ! <p>The Python module must contain a Python class with the same name as ! the module, and that Python class must subclass exactly one Java class ! or interface. The real Java class created will be a subclass of ! whatever Java class is subclassed. - <!--table-stop--> <h3>Examples</h3> <P>On my Windows NT machine, I used the following command to create the file appletdemo.jar (containing all of the applet demos on the web ! site, as well as the core JPython libraries):</P> ! <PRE>c:\jpython\Demo\applet> jpythonc -core -deep -jar appletdemo.jar *.py</PRE> <P>To generate a skeleton class to allow a Python class to be used as java.awt.Component in a Java gui program, I used the following command:</P> ! <PRE>c:\jpython\Demo\javaclasses> jpythonc Graph.py</PRE> ! <P>To generate a JPyth... [truncated message content] |
From: Finn B. <bc...@us...> - 2000-11-12 22:21:14
|
Update of /cvsroot/jython/jython/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv17891 Removed Files: documentation.html Log Message: Not used (it is an outdated copy of index.html) --- documentation.html DELETED --- |
From: Finn B. <bc...@us...> - 2000-11-12 22:20:56
|
Update of /cvsroot/jython/jython/Doc In directory slayer.i.sourceforge.net:/tmp/cvs-serv17824 Removed Files: documentation.ht Log Message: Not used (it is an outdated copy of index.ht) --- documentation.ht DELETED --- |
From: Finn B. <bc...@us...> - 2000-11-12 22:09:13
|
Update of /cvsroot/jython/jython/Demo/applet In directory slayer.i.sourceforge.net:/tmp/cvs-serv17021 Modified Files: HelloWorld.py Log Message: Changed text to Jython. Index: HelloWorld.py =================================================================== RCS file: /cvsroot/jython/jython/Demo/applet/HelloWorld.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HelloWorld.py 1999/09/16 22:09:43 1.2 --- HelloWorld.py 2000/11/12 22:09:10 1.3 *************** *** 3,7 **** class HelloWorld(Applet): def paint(self, g): ! g.drawString("Hello from JPython!", 20, 30) --- 3,7 ---- class HelloWorld(Applet): def paint(self, g): ! g.drawString("Hello from Jython!", 20, 30) |
From: Finn B. <bc...@us...> - 2000-11-10 19:09:59
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30317 Modified Files: BaseEvaluator.py SimpleCompiler.py Log Message: SimpleCompiler.get_module(): Clear up the meaning of the "topmost" flag. This fixes a bug where this example failed: import javax.swing class Action(javax.swing.AbstractAction): pass Index: BaseEvaluator.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/BaseEvaluator.py,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** BaseEvaluator.py 2000/10/13 19:07:25 2.8 --- BaseEvaluator.py 2000/11/10 15:06:56 2.9 *************** *** 261,265 **** def importfrom_stmt(self, top, names): ! module = self.get_module(top, 1) if names == '*': return self.importall_stmt(module) --- 261,265 ---- def importfrom_stmt(self, top, names): ! module = self.get_module(top, 0) if names == '*': return self.importall_stmt(module) Index: SimpleCompiler.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/SimpleCompiler.py,v retrieving revision 2.8 retrieving revision 2.9 diff -C2 -r2.8 -r2.9 *** SimpleCompiler.py 2000/10/18 13:01:11 2.8 --- SimpleCompiler.py 2000/11/10 15:06:56 2.9 *************** *** 285,288 **** --- 285,291 ---- return self.factory.makeString(value) + def ellipsis_const(self): + return self.factory.makeEllipsis() + # builtin types def visitall(self, values): *************** *** 373,377 **** for part in names[1:]: ! top = top.getattr(part) if topmost: return top --- 376,380 ---- for part in names[1:]: ! ret = ret.getattr(part) if topmost: return top *************** *** 389,393 **** def _getnames(self, module): ! #print module.value, module.value.__class__ mod = ImportName.lookupName(module.value.name) if mod: --- 392,396 ---- def _getnames(self, module): ! #print module.value, module.value.__class__ mod = ImportName.lookupName(module.value.name) if mod: *************** *** 399,403 **** for name in names: if name == "__all__": ! loadNames(module.getattr(name).value, module) elif name[:2] == "__": continue; --- 402,406 ---- for name in names: if name == "__all__": ! loadNames(module.getattr(name).value, module) elif name[:2] == "__": continue; |
From: Finn B. <bc...@us...> - 2000-11-10 19:09:57
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30681 Modified Files: ObjectFactory.py PythonVisitor.py Log Message: Added support for the Ellipsis (...) node. Index: ObjectFactory.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/ObjectFactory.py,v retrieving revision 2.4 retrieving revision 2.5 diff -C2 -r2.4 -r2.5 *** ObjectFactory.py 2000/10/13 19:04:58 2.4 --- ObjectFactory.py 2000/11/10 15:08:48 2.5 *************** *** 81,84 **** --- 81,88 ---- PyConstant(value)) + def makeEllipsis(self): + code = jast.GetStaticAttribute("Py", "Ellipsis") + return Object(code, Generic) + def makeJavaInteger(self, code): return Object(code, IntValue) Index: PythonVisitor.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/PythonVisitor.py,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** PythonVisitor.py 2000/10/18 13:01:11 2.6 --- PythonVisitor.py 2000/11/10 15:08:48 2.7 *************** *** 308,311 **** --- 308,314 ---- return self.walker.string_const(node.getInfo()) + def Ellipses(self, node): + return self.walker.ellipsis_const() + def getSlice(self, node): s = [None, None, None] |
From: Finn B. <bc...@us...> - 2000-11-10 19:09:55
|
Update of /cvsroot/jython/jython/Tools/jythonc In directory slayer.i.sourceforge.net:/tmp/cvs-serv30887 Modified Files: javac.py Log Message: Renamed the python.jpythonc.* registry entries to python.jythonc. Index: javac.py =================================================================== RCS file: /cvsroot/jython/jython/Tools/jythonc/javac.py,v retrieving revision 2.9 retrieving revision 2.10 diff -C2 -r2.9 -r2.10 *** javac.py 2000/10/13 18:55:07 2.9 --- javac.py 2000/11/10 15:10:12 2.10 *************** *** 38,45 **** # Search order for a Java compiler: # 1. -C/--compiler command line option ! # 2. python.jpythonc.compiler property (see registry) # 3. guess a path to javac if javac is None: ! javac = sys.registry.getProperty("python.jpythonc.compiler") if javac is None: javac = findDefaultJavac() --- 38,45 ---- # Search order for a Java compiler: # 1. -C/--compiler command line option ! # 2. python.jythonc.compiler property (see registry) # 3. guess a path to javac if javac is None: ! javac = sys.registry.getProperty("python.jythonc.compiler") if javac is None: javac = findDefaultJavac() *************** *** 47,53 **** # Extra options # 1. -J/--compileropts command line option (passed in options) ! # 2. python.jpythonc.compileropts property if options is None: ! options = sys.registry.getProperty("python.jpythonc.compileropts") if options: options = options.split() --- 47,53 ---- # Extra options # 1. -J/--compileropts command line option (passed in options) ! # 2. python.jythonc.compileropts property if options is None: ! options = sys.registry.getProperty("python.jythonc.compileropts") if options: options = options.split() *************** *** 56,63 **** cmd.extend(options) # Classpath: ! # 1. python.jpythonc.classpath property # 2. java.class.path property if cpath is None: ! cpath = sys.registry.getProperty("python.jpythonc.classpath") if cpath is None: cpath = getClasspath() --- 56,63 ---- cmd.extend(options) # Classpath: ! # 1. python.jythonc.classpath property # 2. java.class.path property if cpath is None: ! cpath = sys.registry.getProperty("python.jythonc.classpath") if cpath is None: cpath = getClasspath() *************** *** 74,78 **** Consider using the -C/--compiler command line switch, or setting ! the property python.jpythonc.compiler in the registry.''' % e return 1, '', msg done = None --- 74,78 ---- Consider using the -C/--compiler command line switch, or setting ! the property python.jythonc.compiler in the registry.''' % e return 1, '', msg done = None |
From: Finn B. <bc...@us...> - 2000-11-10 19:09:49
|
Update of /cvsroot/jython/jython In directory slayer.i.sourceforge.net:/tmp/cvs-serv31101 Modified Files: registry Log Message: Renamed the python.jpythonc.* registry entries to python.jythonc. Index: registry =================================================================== RCS file: /cvsroot/jython/jython/registry,v retrieving revision 2.6 retrieving revision 2.7 diff -C2 -r2.6 -r2.7 *** registry 1999/10/27 23:28:38 2.6 --- registry 2000/11/10 15:12:51 2.7 *************** *** 66,72 **** #python.modules.builtin = whatever ! # This specifies the command used by jpythonc to compile Java source # code, along with the complete classpath to use. ! # python.jpythonc.compiler = /depot/java/plat/bin/jikes ! # python.jpythonc.classpath = /usr/java1.2/jre/lib/rt.jar:/jpython/dist:. ! # python.jpythonc.compileropts = +E +D -g --- 66,72 ---- #python.modules.builtin = whatever ! # This specifies the command used by jythonc to compile Java source # code, along with the complete classpath to use. ! # python.jythonc.compiler = /depot/java/plat/bin/jikes ! # python.jythonc.classpath = /usr/java1.2/jre/lib/rt.jar:/jpython/dist:. ! # python.jythonc.compileropts = +E +D -g |