Python to compile to Java-bytecode

Andreas Ulbrich ulbi at ivs.tu-berlin.de
Tue Nov 20 15:22:56 CET 2001


Toni Gaya wrote:

> There is any project that allows compile a Python program to Java
> bytecode, as py2exe does compiling a python program to a .exe? I know
> that there is Jython.. but.. It is a python interpreter writen in
> Java, not a compiler of python source to Java bytecode (Althought it
> implies compile source itself and support libraries, I think it is the
> interesting thing).
> 
> Does not someone more think about compile a python program to Java
> byte code, and the possibility of merge python and java using soap? I
> think it is a important thing to compete against .NET
> Or it is obvious to use a python interpreter in any platform, a java
> interpreter in same platform, and comunicate them using Soap?!


I think Jython is exactly what we need. Of course it includes a runtime
system (interpreter) but this is necessary because Python's object model
is somewhat different from Java's (dynamic typing, inheritance).

jythonc allows you to compile a Python source to Java bytecode that you 
can plug into any other java application.

I think a real compiler with no runtime system necessary will only be 
possible with a statically typed Python, which is subject to the future.





More information about the Python-list mailing list