A line by line translation from Java to Python is almost impossible. Java is simply too cumbersome. It is usually best to look at what the Java app does and then start new with Python.
Here is a small side by side comparison of Java and Python:
http://www.ferg.org/projects/python_...e-by-side.html
Reputation Points: 1333
Solved Threads: 1404
DaniWeb's Hypocrite
Offline 5,792 posts
since Oct 2004