Jython
Encyclopedia
Jython, successor of JPython, is an implementation of the Python programming language
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 written in Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

.

Overview

Jython programs can seamlessly import and use any Java class. Except for some standard modules, Jython programs use Java classes instead of Python modules. Jython includes almost all of the modules in the standard Python programming language
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

 distribution, lacking only some of the modules implemented originally in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

. For example, a user interface in Jython could be written with Swing
Swing (Java)
Swing is the primary Java GUI widget toolkit. It is part of Oracle's Java Foundation Classes — an API for providing a graphical user interface for Java programs....

, AWT
Abstract Window Toolkit
The Abstract Window Toolkit is Java's original platform-independent windowing, graphics, and user-interface widget toolkit. The AWT is now part of the Java Foundation Classes — the standard API for providing a graphical user interface for a Java program.AWT is also the GUI toolkit for a...

 or SWT
Standard Widget Toolkit
The Standard Widget Toolkit is a graphical widget toolkit for use with the Java platform. It was originally developed by IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE...

. Jython compiles to Java bytecode
Bytecode
Bytecode, also known as p-code , is a term which has been used to denote various forms of instruction sets designed for efficient execution by a software interpreter as well as being suitable for further compilation into machine code...

 (intermediate language) either on demand or statically.

History

Jim Hugunin
Jim Hugunin
Jim Hugunin is a software programmer who created the Python programming language extension Numeric , and later created Python implementations for the Java Platform and for Microsoft .NET platform ; he has also co-designed the AspectJ extension for the Java programming language...

 created Jython in late 1997, initially to be able to replace C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 with Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 for performance-intensive code accessed by Python programs, and developed it until 1999. In February 1999, Barry Warsaw took over as the primary developer. In October 2000, Jython moved to SourceForge
SourceForge
SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...

.

For a long time, Samuele Pedroni did most of the work to maintain and develop Jython. At the end of 2004, Pedroni stepped down as the primary developer to concentrate his effort on PyPy
PyPy
PyPy is a Python interpreter and JIT compiler. PyPy focuses on speed, efficiency and 100% compatibility with the original CPython interpreter.- Details and motivation :...

, but he is still considered the authority on Jython internals. In January 2005, Brian Zimmer received a grant from the Python Software Foundation
Python Software Foundation
The Python Software Foundation , is a non-profit organization devoted to the Python programming language, launched on March 6, 2001. The mission of the foundation is to foster development of the Python community and is responsible for various processes within the Python community, including...

 to develop Jython. In December 2005, Frank Wierzbicki succeeded Zimmer as the primary developer. During 2005, development was slow due to lack of knowledgeable developers.

On 3 March 2008, Sun Microsystems
Sun Microsystems
Sun Microsystems, Inc. was a company that sold :computers, computer components, :computer software, and :information technology services. Sun was founded on February 24, 1982...

 announced they had hired Ted Leung and Frank Wierzbicki to work on Jython and Python, similar to Sun's hiring of two JRuby
JRuby
JRuby is a Java implementation of the Ruby programming language, being developed by the JRuby team. It is free software released under a three-way CPL/GPL/LGPL license...

 developers. Development progressed steadily, and Jython 2.5.0 was released on June 16, 2009.

Status and roadmap

The current release is Jython 2.5.2, available since March 3, 2011. Jython 2.5.2 includes new features, like IPv6 support in the socket module and performance enhancements, as well as bugfixes. Jython 2.5.2 implements the same set of language features as CPython
CPython
CPython is the default, most-widely used implementation of the Python programming language. It is written in C. In addition to CPython, there are two other production-quality Python implementations: Jython, written in Java, and IronPython, which is written for the Common Language Runtime. There...

 2.5 As of 2.5.0, Jython is able to run popular Python frameworks such as Django, Pylons, or SQLAlchemy
SQLAlchemy
SQLAlchemy is an open source SQL toolkit and object-relational mapper for the Python programming language released under the MIT License.SQLAlchemy provides "a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a...

.

While Jython technically implements the Python language specification (hence it "is python") the implementation has some differences and incompatibilities with CPython
CPython
CPython is the default, most-widely used implementation of the Python programming language. It is written in C. In addition to CPython, there are two other production-quality Python implementations: Jython, written in Java, and IronPython, which is written for the Common Language Runtime. There...

 (the reference distribution)

License terms

From version 2.2 on, Jython (including the standard library) is released under the Python Software Foundation License
Python Software Foundation License
The Python Software Foundation License is a BSD-style, permissive free software license which is compatible with the GNU General Public License . Its primary use is for distribution of the Python project software...

 (v2). Older versions are covered by the Jython 2.0, 2.1 license and the JPython 1.1.x Software License.

The first two are permissive free software licenses. The third also appears to be, but this is unclear because neither the Free Software Foundation
Free Software Foundation
The Free Software Foundation is a non-profit corporation founded by Richard Stallman on 4 October 1985 to support the free software movement, a copyleft-based movement which aims to promote the universal freedom to create, distribute and modify computer software...

 nor the Open Source Initiative
Open Source Initiative
The Open Source Initiative is an organization dedicated to promoting open source software.The organization was founded in February 1998, by Bruce Perens and Eric S. Raymond, prompted by Netscape Communications Corporation publishing the source code for its flagship Netscape Communicator product...

 have reviewed and commented on it.

The command line interpreter is available under the Apache Software License.

Usage

  • Jython is one of two scripting languages (with Jacl) used in WebSphere Application Server
    WebSphere Application Server
    IBM WebSphere Application Server , a software application server, is the flagship product within IBM's WebSphere brand. It was initially created by Donald Ferguson, who later became CTO of CA Technologies, and the first version launched in 1998....

    . It is used in IBM
    IBM
    International Business Machines Corporation or IBM is an American multinational technology and consulting corporation headquartered in Armonk, New York, United States. IBM manufactures and sells computer hardware and software, and it offers infrastructure, hosting and consulting services in areas...

     Rational
    Rational Software
    Rational Machines was founded by Paul Levy and Mike Devlin in 1981 to provide tools to expand the use of modern software engineering practices, particularly explicit modular architecture and iterative development...

     development tools, where Jython projects can be created using wizards
    Wizard (software)
    A software wizard or setup assistant is a user interface type that presents a user with a sequence of dialog boxes that lead the user through a series of well-defined steps. Tasks that are complex, infrequently performed, or unfamiliar may be easier to perform using a wizard...

    . It is used as the main programming language for the JHepWork
    JHepWork
    jHepWork is an interactive framework for scientific computation, data analysis and data visualization designed for scientists, engineers and students...

     data analysis framework.

See also

  • WebLogic Server
    Oracle Weblogic Server
    Owned by Oracle Corporation, Oracle WebLogic consists of a Java EE platform product-family that includes:* a Java EE application server, WebLogic Application Server* an enterprise portal, WebLogic Portal* an Enterprise Application Integration platform...

     Application Server's wlst
    WLST
    WLST is a radio station licensed to Marinette, Wisconsin broadcasting a country music format.95.1 FM had been an adult contemporary format station up until January, 2008 when Armada Media swapped formats between WLST and WHYB in Menominee, Michigan...

    tool scripting using Jython
  • IBM WebSphere Application Server's wsadmin
    Wsadmin
    The wsadmin tool is a command shell for the purpose of performing systems administration on all the artifacts in a IBM WebSphere Application Server cell. It gets its name from the name of the shell script that invokes this command shell. This command shell can execute connected to a WAS cell or...

    tool scripting using Jython
  • IronPython
    IronPython
    IronPython is an implementation of the Python programming language targeting the .NET Framework and Mono. Jim Hugunin created the project and actively contributed to it up until Version 1.0 which was released on September 5, 2006. Thereafter, it was maintained by a small team at Microsoft until...

     is an implementation of Python
    Python (programming language)
    Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

     for .NET and Mono
    Mono (software)
    Mono, pronounced , is a free and open source project led by Xamarin to create an Ecma standard compliant .NET-compatible set of tools including, among others, a C# compiler and a Common Language Runtime....

    , originally created by Jython's creator, Jim Hugunin.
  • PyPy
    PyPy
    PyPy is a Python interpreter and JIT compiler. PyPy focuses on speed, efficiency and 100% compatibility with the original CPython interpreter.- Details and motivation :...

     a self-hosting interpreter for the Python programming language.
  • ZK is a Java Ajax framework that allows glue logic written in Jython.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK