If you are confused about how to run in a Python environment, you can browse the following articles to learn about how to run in a Python environment, I hope you will have a detailed understanding of the following article. The following is a detailed description of the article.
I would like to reiterate the issue of discontinuing from the Python environment.
If you want to run a separate program in the Python environment without downloading a python release, you do not need to compile the Python code into C code. There are many tools that can identify the modules that the program depends on and bind these modules with the program to generate a separate execution file.
One of the Tools is freeze tool, which is included in the python code tree as Tools/freeze. It converts python bytecode into a C array and a compiler that can embed all your modules into a new program. This compiler is linked with the python module.
- The five advantages of the vim compiler in Python scripts
- Compile and convert a Python program into a Windows executable program
- Compile the python code into two files used by the exe file.
- In Python dynamic compiler, PyPy is more compatible than C in operations.
- Python dynamic compiler PyPy is better than other dynamic Compilers
It recursively scans the source code based on the import Statement and finds the module in the standard python path and the module built-in module in the source code directory ). The bytecode of the module written in python is subsequently converted to the C code. You can use the objective Al module to convert it into an array generator of the Code object) and generate a customizable configuration file, contains only the modules used by the program.
Finally, compile the generated C code and link it to the remaining python interpreter to generate a separate file that achieves exactly the same effect as your script execution in the runtime from the Python environment.
Apparently, freeze needs a C compiler. However, some tools are not required. The first is Gordon McMillan's installer, which works on Windows, Linux, and at least some Unix variants. Note: This method is recommended in * nix. Use make to obtain an independent file .) The other is Thomas Heller's py2exe (applicable only to Windows platforms). Note: This method is recommended in win, which is simple to use and powerful. The disadvantage is that a large number of files are generated.
And must be python. dll) The third is the SQFREEZE of Christian Tismer, which attaches the bytecode to a special python interpreter, which is responsible for finding this code. Python 2.4 may introduce similar mechanisms.
Other tools include Fredrik Lundh Squeeze and Anthony
The above content is a detailed introduction to the related applications that run out of the Python environment.