Calling (C)Python code from Java: Is it JPype?

F. GEIGER f.geiger at vol.at
Wed Sep 29 09:56:14 EDT 2004


I've dev'ed a Python prototype of an app, that besides the internals making
it up has a gui. While test-driven dev'ing the app's internals in Python is
fun as usual, dev'ing the GUI is not so funny, at least for me.

I guess dev'ing a GUI in a test-driven way is not possible, or is it? I'm
using wxPython, so if anyone has an idea...

For now most of the time I extend and change the gui things, then run it, do
the clicks to go thru the new things and - bang: Missing attribute bla bla
bla or an error like that. Yes, I use Pychecker, but it isn't of real help
in gui dev'ing (at least in my GUIs ;-)).

So, a compiler could ease things a bit here. While I want the complicated
stuff remaining written in Python, I'd write the GUI things in Java. Java,
because I plan to run the app on Linux too (dev'ing on Windows for now).
Otherwise *.NET could be an option (well, perhaps I should look at Mono).

Now, if I go the Java route, how can I call my Python stuff from Java, if I
do not want to use Jython, which lags behind CPython 3 minor versions (2.1.
vs. 2.4)? Google showed up JPype, but this seems to enable me the other way
round: Call Java code from CPython. Or are there any plans to make this
possible the other way round too?

Any other options here?

Many thanks in advance
Franz GEIGER









More information about the Python-list mailing list