ANN: java2python 0.2

Troy Melhase troy at
Mon Feb 19 05:38:13 CET 2007

java2python - Java to Python Source Code Translator
java2python 0.2 Released 18 February 2007

What is java2python?
java2python is a simple but effective tool to translate Java source code into 
Python source code.  It's not perfect, and does not aspire to be.

What's new in this release?
Small enhancement:  added converstion of "public static void main" method into 
module "if __name__ == '__main__' block.

Better classmethod support:  fixed class/instance member formatting strings to 
account for classmethods.

Slightly more pythonic:  replace "x == None" expressions with "x is None" in 
output code, also replace "x != None" with "x is not None".

Bugfix:  Fixed dotted type identifiers.

Better exception translation:  added support for mapping java exception types 
to python exception types.

Support for non-local base class members:  added support for base class 
members via config modules.

Bugfix:  changed single % characters to %% in expression format strings.

Small enhancement:  added support for 'methodPreambleSorter' configuration 
item.  With this value, config modules can specify how to sort method 
preambles (typically decorators).

Where can I get java2python?
java2python is available for download from Google code:

Project page:

How do I use java2python?
Like this:

	$ j2py -i -o

The command has many options, and supports customization via multiple 
configuration modules.

What are the requirements?
java2python requires Python 2.5 or newer.  Previous versions may or may not 
work.  java2python requires ANTLR and PyANTLR to translate code, but 
translated code does not require ANTLR.

What else?
java2python is installed with distutils.  Refer to the Python distutils 
documentation for more information.  The digest version is:

    $ tar xzf java2python-0.2.tar.gz
    $ cd java2python-0.2
    $ python install

java2python is licensed under the GNU General Public License 2.0.  No license 
is assumed of (or applied to) translated source.

I'm very interested in your experience with java2python.  Please drop me an 
note with any feedback you have.

Troy Melhase
mailto:troy at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 

More information about the Python-announce-list mailing list