PYC file
PYC is compiled by the py file after the binary file, the py file becomes PYc file, the speed of loading increased, and PYC is a cross-platform bytecode, is executed by Python virtual machine. PYC content, is related to Python version, the different version of the compiled PYc file is different, 2.5 compiled PYC files, 2.4 version of Python is not executable. PYC files can also be deserialized, and different versions of the compiled PYC files are different.
How to compile into a PYC file that can be run
2.7.1 (r271:8683227201018:30:46) [MSC v.150032"help""copyright""credits"or"license"for more information.>>>import py_compile>>> py_compile.compile("D:/test.py")>>>
Batch compilation only needs to enter the corresponding directory name
You can now see that the PYc file was produced in the corresponding directory
The PYc file is a byte code that is used to save the build of a Python virtual machine. In the run of Python, if you encounter import, first look for the corresponding. pyc or. dll file in the set path. If you do not have these files, compile the corresponding pycodeobject and wear the. pyc file to write intermediate results.
What is the pyc of Python's basic knowledge?