The Artima Developer Community
Sponsored Link

Java Community News
Jython 2.2 Released

1 reply on 1 page. Most recent reply: Aug 25, 2007 10:50 PM by Jayce Vaidyan

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Jython 2.2 Released Posted: Aug 24, 2007 7:41 AM
Reply to this message Reply
Summary
After nearly six years in the making, the Jython project released the latest version of its Java-based Python implementation, making Jython compatible with Java 6 and Python 2.2.
Advertisement

The Jython project, released Jython 2.2, the first new version of the Java-based Python language implementation in almost six years. Features in Jython 2.2 roughly correspond to features of Python 2.2, according the the projects's documentation.

Jython's three main components are a compiler that compiles Python source code to Java bytecode. Those bytecodes can then directly execute on the JVM. It also provides set of support libraries used by the compiled Java bytecodes. In addition, the distribution provides some extra support to make it easier to invoke classes in Java packages from within Jython.

Key features of the latest release include:

  • New-style Python classes and their instances are Java serializable
  • Java collections integration
  • Completely rewritten socket module and new select module using java.nio which allows the use of SSL and non-blocking sockets.
  • java.nio exceptions are mapped to their corresponding Python error codes when thrown.
  • Support for JDK1.5 and 1.6
  • telnetlib from CPython
  • xml modules from pyxml
  • Java collections integration
  • A new compiler AST

What do you think of Jython as an alternative language in which to write for the JVM?


Jayce Vaidyan

Posts: 8
Nickname: finite42
Registered: Mar, 2007

Re: Jython 2.2 Released Posted: Aug 25, 2007 10:50 PM
Reply to this message Reply
Most of the changes seems to be under the hood---performance and quality.

Java platform integration is really neat. For example Java collections data types behaves like Python lists and maps in some ways. For instance the iteration with for seems to work with Java list instances. "Stringification" also seems to work.


from java.util import ArrayList
l = ArrayList([2,4,6])

print l
[ x for x in l ]


One of the reasons I stayed away from Jython for a long time is that the project looked abandoned. I have been tracking the project since it started to come back to life recently.

Most of my Python scripts are not appropriate for Jython (and I use a lot of 2.5 features). The question is whether my use of Python could include other areas currently catered to almost exclusively by Java.

Will there be 2.4 or 2.5 language level support coming up soon?

Flat View: This topic has 1 reply on 1 page
Topic: IBM's JLINQ Brings Language-Integrated Querying to Java Previous Topic   Next Topic Topic: Bill Burke on RESTless, RESTFul, and RESTlike

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use