What do the python file extensions, .pyc .pyd .pyo stand for?

PythonServer Side ProgrammingProgramming

The .py, .pyc, .pyo and .pyd files have their own significance when it comes to executing python programs. The are used for −

  • .py: The input source code that you've written.

  • .pyc: The compiled bytecode. If you import a module, python will build a *.pyc file that contains the bytecode to make importing it again later easier (and faster).

  • .pyo: A *.pyc file that was created while optimizations (-O) was on.

  • .pyd: A windows dll file for Python. http://docs.python.org/faq/windows.html#is-a-pyd-file-the-same-as-a-dll

Updated on 18-Feb-2020 05:02:06