[Python-ideas] Changing the name of __pycache__

Raymond Hettinger raymond.hettinger at gmail.com
Wed Feb 9 17:02:15 CET 2011


On Feb 9, 2011, at 1:07 AM, M.-A. Lemburg wrote:

> Raymond Hettinger wrote:
>> It would be great if there was some way to change the name to .pycache so that it doesn't pollute directory listings.
>> 
>> The dot-naming convention seems to be widely used (.bashrc, .emacs, .hgignore, etc.).  Ideally, we should follow that convention also or at least provide a way to make the change locally (perhaps an environment variable).
> 
> While I don't the like name either, I think it's important that this
> particular aspect is not configurable: there are tools relying on
> finding the .pyc files based on the location of the .py files
> and those don't necessarily run in the same environment as the
> application, e.g. think of all the freeze tools, or situations
> where the application itself runs as daemon under a different
> user account than the one used to administer the application.

The #define for the name is on line 115 in Python/import.c.

If a consensus were to emerge, it would still be possible to 
change the name from "__pycache__" to ".pycache".


Raymond





More information about the Python-ideas mailing list