Source: http://blog.csdn.net/chroming/article/details/52083387
1. py
The script file is the most basic source code extension. A direct double-click Run under Windows invokes Python.exe execution.
2, PYc
When you execute Python code, you will often see an pyc file with the same name automatically generated in the same directory. This is the Python source code after the compiled bytecode, generally in the code execution, automatically generate the referenced py file PYc
File. This file can be executed directly, open with a text editor and cannot see the source code.
3, Pyw
is another extension, the only difference with the PY is that under Windows double-clicking the pyw extension of the source code will call Pythonw.exe execute the source code, this way of execution will not have a command line window.
It is mainly used when the GUI program publishes without needing to see the console information.
4, PYO
Optimized encoded file similar to PYC.
5, PYD
This is not generated from a Python program, but an extension written in other languages that can be called by Python. Sometimes dependencies on other DLL files can be import.
Python Program Extension differences