Home  >  Article  >  Backend Development  >  Does python support win10?

Does python support win10?

anonymity
anonymityOriginal
2019-06-13 14:20:023807browse

Python is a computer programming language. It is an object-oriented dynamic type language that was originally designed for writing automated scripts (shells). With the continuous updates of the version and the addition of new language features, it is increasingly used for the development of independent and large-scale projects.

Does python support win10?

The answer is yes, Python runs independently of the platform.

Does python support win10?

Let’s understand how python works:

1. python first compiles the code (.py file) into bytes The code is handed over to the bytecode virtual machine, and then the virtual machine executes the bytecode instructions one by one from the compiled PyCodeObject object, and executes this bytecode instruction in the current context, thereby completing the execution of the program. The Python virtual machine actually executes the process of a file in a simulated operation. The PyCodeObject object contains bytecode instructions and all static information of the program, but does not include dynamic information when the program is running - execution environment (PyFrameObject)

2. Bytecode corresponds to the python virtual machine program is the PyCodeObject object; the

.pyc file is the representation of the bytecode on disk.

3. From an overall perspective: executing programs in OS is inseparable from two concepts: processes and threads. These two concepts are simulated in python. The simulation processes and threads are PyInterpreterState and PyTreadState respectively. That is: each PyThreadState corresponds to a frame stack, and the python virtual machine switches between multiple threads. When the python virtual machine starts executing, it will first perform some initialization operations, and finally enter the PyEval_EvalFramEx function. Its function is to continuously read the compiled bytecodes and execute them one by one, similar to the process of CPU executing instructions. Inside the function is mainly a switch structure, which executes different codes according to different bytecodes.

The above is the detailed content of Does python support win10?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn