[Python-Dev] Fixing #7175: a standard location for Python config files (original) (raw)

Tim Golden mail at timgolden.me.uk
Thu Aug 12 12:33:59 CEST 2010


On 12/08/2010 10:50, Tim Golden wrote:

Unfortunately, the canonical place is not always the place most used. Especially since the convention under *nix is to place dotfile or dotdirs under HOME.Windowsdoesn′t,bydefault,haveaHOME. Windows doesn't, by default, have a HOME.Windowsdoesn′t,bydefault,haveaHOME so various locations are considered $HOME, including (but not limited to):

* the directory pointed to by %HOME% * the directory pointed to by %USERPROFILE% * the "My Documents" shell folder (often, but not always, %USERPROFILE%\My Documents) * c:\ (no: really) * the NT profile home directory (typically a mapped share)

Additionally, on Windows Python expands ~ to the first of:

%HOME% %USERPROFILE% %HOMEDRIVE%%HOMEPATH%

all of which are perfectly defensible defintions of "Home" on Windows. But combining that with the Unix-minded concept of "create a dotfile called ~/.myapp" means you get dotapps in non-standard places on Windows.

TJG



More information about the Python-Dev mailing list