CPython
When we downloaded and installed Python 3.x from the official Python website, we immediately got an official version of the interpreter: CPython. This interpreter was developed in C language, so called CPython. Running Python at the command line is the start of the CPython interpreter.
CPython is the most widely used Python interpreter. All the code for the tutorial is also executed under CPython.
Jython is a Python interpreter running on the Java platform that compiles python code directly to Java bytecode execution.
The standard version of Python is compiled with C, also known as CPython.
There is also a Python interpreter that is written entirely in Java, called Jython.
There are some subtle differences between the two interpreters, but they are very close and the startup environment is identical.
In general, Python is CPython, which is compiled with C, which supports the extension of C and does not support Java extensions.
Jython, a python implemented with Jpython, supports Java extensions that can run Jython as long as there is a Java virtual machine, with the ability to access Java packages and class libraries, and to provide access to Java native exception handling , inheriting the characteristics and introspection ability of JavaBeans. Encouraging Python to Java development, the Jython program can be seamlessly integrated with Java. In addition to some standard modules, Jython uses Java modules. Jython has almost all the modules in the standard Python that do not depend on the C language. For example, GUI developers can access the Java awt/swing Library, and Jython's user interface will use SWING,AWT or SWT. Jython can be dynamically or statically compiled into Java bytecode.
Jython also includes Jythonc, a compiler that translates python code into Java code. This means that Python programmers can use a class library that they write in Python code in a Java program.
Current situation and future
The current Jython version is Jython-2.7.0. It improves integration with Java and implements the functionality of CPython 2.5
Advantages of Jython
Jython greatly reduces the amount of programming code compared to similar Java programs.
Jython provides a scripting engine for the Java development environment, makes it easy to test the Java class Library, and has both an interpreter and a compiler to test program code without compiling, leveraging the Java native garbage collector (CPython does not implement this feature).
?
Introduction to CPython and Jython comparison