1

I am running .py files from a read-only network folder (via Python 2.7 on Windows). Are pyc files still generated? And if so, where do they go?

lofidevops
  • 15,528
  • 14
  • 79
  • 119

1 Answers1

1

The contents are generated by the compiler, but they are simply not saved (a loader may set an alternate __cached__, but normally doesn't). The .pyc files are merely used to cache the result of the compilation. distutils.util.byte_compile has some documentation links for further details.

Yann Vernier
  • 15,414
  • 2
  • 28
  • 26