What are zero-based tutorial -Python python interpreter that?

When we write Python code, we get to .py extension of a text file containing Python code. To run the code, you need Python interpreter to execute .py file.

Since the whole Python language interpreter from specification to are open source, so in theory, as long as the level is high enough, anyone can write Python interpreter to execute Python code (of course, very difficult). In fact, the existence of multiple Python interpreter.

CPython

When we download and install Python 3.x from the official Python website, we have direct access to an official version of the interpreter: CPython. The interpreter is written in C language development, so called CPython. At the command line to run python is to start CPython interpreter.

CPython is the most widely used Python interpreter. All the code tutorials are also executed in CPython.

IPython

IPython is based on an interactive CPython interpreter, that is to say, just IPython has been enhanced in the interactive mode, but the execution of the functions and CPython Python code is exactly the same. Like many domestic browser Although the appearance is different, but the core are actually called IE.

>>> CPython used as prompt, and with IPython In [ID]: as a prompt.

PyPy

Python interpreter PyPy another, its goal is to speed execution. PyPy using JIT technology, Python dynamically compiled code (note not explained), it is possible to significantly improve the execution speed of the Python code.

Most of Python code can be run under PyPy, but CPython PyPy and some are different, which leads to the same Python code execution may have different results in the two interpreter. If you want to put under PyPy code execution, we need to understand the different points of PyPy and CPython.

Jython

Jython Python interpreter is running on the Java platform, Python code can be directly compiled into Java bytecode execution.

IronPython

IronPython and Jython similar, but IronPython Python interpreter is running on the Microsoft .Net platform, Python code can be directly translated into .Net byte code.

summary

Many Python interpreter, but the most widely used or CPython. If you want to, and interact with Java or .Net platform, the best way not using Jython or IronPython, but interact through a network calls, ensure the independence between the various programs.

Disclaimer: The content and images from the network, belongs to original author, if your original copyright infringement, please inform, we will remove the content as soon as possible.

Guess you like

Origin www.cnblogs.com/woshijiuke/p/12091138.html