Mixing Python and Java
Andreas Schreiber · elib (German Aerospace Center) · 2009
Java is being used for many existing applications in a variety of domains. Sometimes it is useful to integrate them with Python. For instance, one may wish to add embedded Python scripting to Java applications, to communicate with separate Python code written for CPython, or use existing Java libraries from Python code. The talk gives an overview of the various techniques, tools, and libraries for bridging Python and Java. In particular, the following implementations are described and compared: * Embedding of Python into Java with Jython. * Calling Java code from CPython scripts with JPype. * Calling CPython from Java code with JEPP. * Using inter process communication between Python and Java (e.g., with CORBA or SPIRO). Examples for all techniques are demonstrated, and use cases for the different approaches are presented with examples from real world applications.