Programming: Playing with Jython
Jython is a version of Python written in pure Java. The advantage of this is you can call Java classes from within Python easily. I'm playing with this because the code I work with is in Java but some of my integration tests are in Python. I'd like to put the tests in Ant and it seems like it would work better if I called it through Jython.
Unfortunately, Jython is behind the curve when it comes to state of the art Python. The regular CPython is at version 2.4.1 and Jython is at around 2.1. So there's lot's of little things that Jython is missing. A big one one optparse which I use for every program I write. Fortunately,
I was able to copy some of the python files from CPython to the Jython directory and it worked!
For the curious I copied: optparse.py, locale.py, gettext.py and textwrap.py.
I had no problem using zxJDBC instead of cx_Oracle which was a relief. I hope that Jython, with it's new funding, works hard to keep up with CPython, I'm not convinced yet that Jython is the route for me to go for my integration tests. I just have too many little programs which would need to be modified in order for them to work and others that use libraries writen in C which would not likely be ever ported to Jython.
Unfortunately, Jython is behind the curve when it comes to state of the art Python. The regular CPython is at version 2.4.1 and Jython is at around 2.1. So there's lot's of little things that Jython is missing. A big one one optparse which I use for every program I write. Fortunately,
I was able to copy some of the python files from CPython to the Jython directory and it worked!
For the curious I copied: optparse.py, locale.py, gettext.py and textwrap.py.
I had no problem using zxJDBC instead of cx_Oracle which was a relief. I hope that Jython, with it's new funding, works hard to keep up with CPython, I'm not convinced yet that Jython is the route for me to go for my integration tests. I just have too many little programs which would need to be modified in order for them to work and others that use libraries writen in C which would not likely be ever ported to Jython.
Comments