Python01-Python program execution process brief

       Python is considered a development language that can handle any problem at present. The general application is in web, testing, operation and maintenance, etc. More advanced applications, such as the most popular artificial intelligence, also need to have a Python foundation.

       In this section, I will first explain the operation process of Pyhon. Since my mainstream language is the JAVA language, I will explain it by comparing it with the JAVA language (although the execution process of Pyhon itself is relatively easy to understand).

       The source code of the JAVA language is a file ending with .java, which is then compiled into an executable file .class by the JAVA virtual machine (JVM) through the javac command, and then the JAVA virtual machine executes the .class file to complete the specified operation.

       The execution process of Python is exactly the same as that of JAVA, except that the Python virtual machine (PVM) is used to process Python programs. The source code file of Python is a file ending with .py, which becomes an executable file of .pyc after being parsed by PVM. PVM performs the specified operation by executing the .pyc file.



 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326454442&siteId=291194637