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?
Asked
Active
Viewed 1,348 times
1
lofidevops
- 15,528
- 14
- 79
- 119
1 Answers
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
-
See also https://stackoverflow.com/questions/154443/how-to-avoid-pyc-files for *inhibiting* pyc files. – lofidevops Mar 31 '17 at 15:02