Python to Java conversion: PyNSource or something else?

Anybody knows a good way to convert Python code to Java?

A quick Google search will reveal the following free program:
http://www.atug.com/andypatterns/pynsource_java_code_generation.htm

OK. I downloaded the following:      PyNsource-1.51.win32-py26.exe  from

http://sourceforge.net/projects/pyidea/files/PyNSource/1.51/

This is a GUI program that will just make a UML diagram of the Python program.

How do  I get to Java code from here? - I don't understand.

I am really confused about the following help on this, because
it is just seems to be running the program in Python, with no conversion to Java:

http://www.andypatterns.com/index.php/products/pynsource/codegeneration/

Also attached a Python source code example, I would like to try to convert.

Thanks for your help.










 SudokuKeyDisplay.py
AttilaBAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

for_yanCommented:


Perpas you amy want to look at this trail:
http://www.experts-exchange.com/Programming/Languages/Java/Q_27432498.html

Its solurtion

http://www.jython.org/archive/21/docs/jythonc.html

and soem other suggestions there.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
for_yanCommented:
Also there are a lot of Sudoku code in java - just google it

Sudoku code java


will find lots of examples  maybe you'd not need to convert from Python
0
AttilaBAuthor Commented:
It just happens to be some sudoku code, but I would like to find a more generic solution
for my daughter for other Python projects.  It is not just about Sudoku.

Actually Jython that you pointed me to  may work for me, even if it cannot generate Java source any more because I got a decompiler for Java class files. I will be able to check it out probably tomorrow, if no better solution is found.
0
ksivananthCommented:
I would call python code from java program instead of generating java source equivalent to python source, this ppt may help you decide, http://www.slideshare.net/onyame/mixing-python-and-java

Note: if the python code access some native C/C++ libs, Jepp is what suggested as the bridge
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.