Python - Compiled File (Cache)

About

The compiled file of Python.

Location

To speed up loading modules, Python caches the compiled version of each module in the __pycache__ directory

Format

The name

module.version.pyc

where:

For example, in CPython release 3.3:

  • source: spam.py
  • compiled version: __pycache__/spam.cpython-33.pyc.

This naming convention allows compiled modules from different releases and different versions of Python to coexist.

Documentation / Reference


Powered by ComboStrap