JPE: Java - C Python Extension Project

Jean Hemmi jean.hemmi at arakne.com
Wed Jul 5 04:02:46 EDT 2000


We need a full-featured C-Python / Java integration!

Besides minor functional differences, JPython has the major limitation
of not being able to leverage existing Python (binary) extensions.
Presently, there is no C-Python extension to Java.
We, at Arakne, are annoyed by this situation: We cannot integrate the
Python binary extensions we developped with any of the Java SDK's.

Python is among the fittest integration tools around today - we should
be able to have a seamless integration between Python and Java-.

(I'll leave to others the opportunity to elaborate on the
consequences of the contact between Python's and Java's rationales,
especially if both were tightly bound together...)

This would also open a new perspective: at present the "standard" way to

develop native web browser plug-in is through the Java plug-in mechanism

and Java's JNI C API.
At the end of the pipe is the ability to run, within a client web
browser Python scripts, just like Javascript; Python bytecode, like a
Java applet; or both.
Like binary plug-ins, binary python extensions (*.pyd files) could also
get downloaded and installed.

After a successful experience at integrating two large and complex
object-oriented systems into Python, we feel confident at applying the
same patterns to a Java integration - after all, Java is just yet
another external system to Python... -

We are laying out below the requirements to such an integration:
- Multithread compatibility (at least when the JVM relies on OS threads)

- Access to the Java environment from Python
- Seamlessness from both sides
- Java objects appearing as native Python objects (resolving
overloading)
- Extensibility of Java classes into Python
- Access to the Python environment from Java
- Python objects accessible as Java objects
- Extensibility of Python classes within Java
- Exception mapping
- Python programming on client Web browser, like Javascript
- Ability to run Python bytecode files on the client Web browser
- Conciliation of security features (adapting Python's restricted
execution mode for 'Pylets')

Voila!

Reactions and comments ?

Frederic Giacometti
Arakne
frederic.giacometti at arakne.com







More information about the Python-list mailing list