how can I translate efficiently a Java code to python?

If you want to translate java code to python you have to translate it manually. Automatic conversion generally does not have the appropriate quality. It looks like there are some tools out e.g. java2python but the author states

The generated Python code is not guaranteed to run, nor is guaranteed to be syntactically valid Python.

Converting a library to another programming language is never an easy task.

If you simply want to use a java library in a application that you want to write in python you could give jython a try.

Leave a Comment