what is Jython?

Chris Angelico rosuav at gmail.com
Fri Jan 9 17:15:25 CET 2015


On Sat, Jan 10, 2015 at 3:06 AM, Grant Edwards <invalid at invalid.invalid> wrote:
> Just to clarify, Jython
>
>   1) is a Python compiler that compiles Python source code into JVM
>      bytecode (class, jar, whatever) that runs on a standard Java
>      runtime. Python programs compiled with Jython can call standard
>      Java libraries and and can call or be called by code written in
>      Java.
>
>   2) is a Python compiler that is written in Java.
>
> AFAK, these are in principal orthogonal.  Number 1) is the important
> part and does not require that 2) be true.  The Jython compiler could
> (in theory) be implemented in C, Fortran, or BASH, but there are some
> practical advantages to using Java to write a compiler that generates
> JVM bytecode.

Indeed. The point of Jython is that it compiles to Java byte-code,
putting it on par with languages like NetRexx as alternative ways to
create .class files.

ChrisA



More information about the Python-list mailing list