[Python-Dev] pycache creation (original) (raw)
Ron Adam rrr at ronadam.com
Wed Mar 24 02:42:44 CET 2010
- Previous message: [Python-Dev] __pycache__ creation
- Next message: [Python-Dev] __pycache__ creation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Terry Reedy wrote:
On 3/22/2010 2:15 PM, Antoine Pitrou wrote:
What I am proposing is that the creation of pycache /directories/ be put outside of the core. It can be part of distutils, or of a separate module, or delegated to third-party tools. It could even be as simple as "python -m compileall --pycache", if someone implements it.
Creation of the pycache /contents/ (files inside the directory) would still be part of core Python, but only if the directory exists and is writable by the current process. -1 If, as I have done several times recently, I create a directory and insert an empty init.py and several real module.py files, I want the .pycs to go into pycache *automatically, by default, without me also having to remember to create an empty pycache directory, *each time*. Ugh.
I think I misunderstood this at first.
It looks like, while developing a python 3.2+ program, if you don't create an empty pycache directory, everything will still work, you just won't get the .pyc files. That can be a good thing during development because you also will not have any problems with old .pyc files hanging around if you move or rename files.
The startup time may just be a tad longer, but probably not enough to be much of a problem. If it is a problem you can just create the pycache directory, but nothing bad will happen if you don't.
Ron
- Previous message: [Python-Dev] __pycache__ creation
- Next message: [Python-Dev] __pycache__ creation
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]