I am writing a complete application in Jython at the moment and highly recommend it. Having all the Java libraries at your disposal is very convenient, and the syntax and language functions of Python actually make some of them easier than in Java (I mainly talk about Swing here).
Check out the chapter on GUI applications from the Jython book . He makes many comparisons, such as “Look at all this Java code, and now look at its reduction to half-length Python code!”.
The only caveats I found are:
- The development of Jython tends to lag a bit behind Python, which can be annoying if you find a cool way to do something in Python, only to find that it is not supported in the current version of Jython.
- Sometimes you may have hiccups with an interface between Python and Java (I have some unresolved issues here and here , although there are always workarounds for this kind of thing).
- Distribution is not as easy as it could be, although once you figure out how to do it, it is pretty painless. I recommend using the method here . It essentially consists of:
- Explosion of jython.jar and adding its own modules to it.
- Writing and compiling a small Java class that creates a Python interpreter and loads your Python modules.
- Creating an .jar executable consisting of jython.jar modules, native Python modules, and a Java class.
Cam jackson
source share