Python Study Notes-python interpreter, python-python
First, you need to understand the python interpreter.
What is a python interpreter? After saving the python code, we will get a text file with the. py extension. To run this file, you need the python interpreter to execute the. py file.
Here, we will introduce three interpreters.
1. CPython
After downloading and installing Python 2.7 from the official Python website, we directly obtained an official version of the interpreter CPython.
This interpreter is developed in C language, so it is called CPython. Running python in the command line is to start the CPython interpreter. CPython is the most widely used Python interpreter. All the code of the tutorial is also executed under CPython.
2. Jython
Jython is a python interpreter running on the Java platform. It can directly compile python code into Java bytecode for execution.
3. PyPy
PyPy is another python interpreter whose goal is the execution speed. PyPy uses JIT technology to dynamically compile python code (note that it is not an explanation), so it can significantly improve the execution speed of python code. Vast majority
Python code can be run in PyPy, but PyPy and CPython are somewhat different, which may lead to different results for the same python code to be executed in the two interpreters.
If your code is to be executed in PyPy, you need to understand the differences between PyPy and CPython.
For more information about the python interpreter, see the python tutorial on Liao Xuefeng's official website.