[Python-ideas] Changing the name of __pycache__

Ron Adam rrr at ronadam.com
Wed Feb 9 19:40:06 CET 2011



On 02/09/2011 10:02 AM, Raymond Hettinger wrote:
>
> 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".

-1

I personally don't like hidden directories and files of any type. I think 
it is very good that python avoids those where it can.

Hidden files and directories have their own problems.  They can be 
forgotten or missed.  If there is a problem associated with a hidden file, 
it can lead to a lot of wasted time when people look for problems else 
where because they are not readily aware the hidden files or directories.

Please don't use hidden files or directories, the use of a single directory 
is the best balance of keeping things out of the way, yet not hiding them 
totally.

Ron




More information about the Python-ideas mailing list