Python Programming Portal
Python Programming Portal
J2EE curve
Add Site Feed
Translate java code into python source code using java2python tool PDF Print E-mail
Written by Administrator   
Tuesday, 06 March 2007
java2python claims to be a simple but effective tool to translate Java source code into Python source code. Troy Melhase, the creator of the java2python project has announced the first release.

java2python is licensed under the GNU General Public License 2.0. To translate code, java2python requires python 2.5, ANTLR and PyANTLR. The following is working with java2python 0.1 version:

    * class definitions, inner class definitions
    * method definitions
    * most expressions
    * if statements, for statements, while statements
    * raises statement
    * type translation (e.g, String -> str)
    * class member access to instance attributes

Troy Melhase says "I've written java2python with the idea that it should provide a high degree of customization to the generation process. It allows for multiple, cumulative configuration modules, which means you can have a configuration for an entire translation project, and also have configurations for individual modules.

Let me add a few more waffles before concluding. Yes, I know Python is not Java. Yes, I know that this tool doesn't translate the meaning of the input source code. Yes, the tool does not produce idiomatic Python. And yes, I know the tool isn't even close to perfect. But even with all of those problems, I know this is better than what I was doing."

java2python is available on Google code at http://code.google.com/p/java2python/

Related

Comments

You must javascript enabled to use this form


Add Python Site Feed
Latest
Popular
Go to top of page  Home | Content | Resources | Contact Us | Blogs |

Copyright 2004 Rightrix Solutions. All rights reserved. All product names are trademarks of their respective companies.
Views expressed at PythonThreads.com reflect the views of the authors alone, and do not necessarily reflect those of PythonThreads.com.

Terms of Use          Privacy Policy
PythonThreads.com - Python Programming Language Portal