The python interpreter is a program that interprets the execution of python scripts. When developers write python code and save it, they will get a text file with a ".py" extension. To run this file, just A python interpreter is required to execute the ".py" file.
#The python interpreter is a program that interprets the execution of python scripts. After writing the python code and saving it, we will get a text file with a .py extension. To run this file, you need the python interpreter to execute the .py file.
Python interpreter types
Python has several versions of interpreters:
CPython: The official version of the interpreter. When we download and install Python 2.7 from the official Python website, we will get the interpreter directly. This interpreter is developed in C language, so it is called CPython. CPython is the most widely used Python interpreter. What we usually talk about, download, discuss, and use is this interpreter.
Ipython: An interactive interpreter based on CPython, which has been enhanced in interactive mode. The function of executing Python code is exactly the same as that of CPython. Use CPython> ;>> is used as the prompt, and IPython uses In [serial number]: as the prompt.
PyPy: A Python interpreter that pursues execution speed. Using JIT technology to dynamically compile (note, not interpret) Python code can significantly improve the execution speed of Python code. Most CPython codes can be run under PyPy, but there are still some differences, which results in the same Python code executing under two interpreters may have different results.
Jython:The Python interpreter running on the Java platform can directly compile Python code into Java bytecode for execution.
IronPython:Similar to Jython, except that IronPython is a Python interpreter running on the Microsoft .Net platform and can directly compile Python code into .Net bytecode .
Recommended related video tutorials: "python tutorial", "python3 tutorial"
The above is the detailed content of What is the interpreter of python?. For more information, please follow other related articles on the PHP Chinese website!