Hi all, Just want to point out that if tools can accept a config file in a cross-platform standard location (perhaps in addition to a platform-specific one), then that is incredibly useful.
Just search on Github for "dotfiles", and see how many people store their configuration in a git repo, so they can just go to a fresh machine, "git clone dotfiles" in their $HOME and be fully set up. A platform-independent location also simplifies life for us who use Linux, Windows and MacOs on a daily basis. (And then there is the fact that these platform "standards" are only followed very haphazardly anyway, e.g. Windows Vim uses ~\.vimrc on Windows and not somewhere in $LOCALAPPDATA .) As an aside, I don't agree with the "appdirs" package on Linux: XDG != Linux. That may seem pedantry, but while ~/.local is perhaps not too bad for user-specific config, /etc/xdg is almost certainly the wrong location for global config any application that is not part of a desktop environment. (In fact, such a directory may not exist on a typical headless Linux install.) Stephan 2018-02-06 16:44 GMT+01:00 Paul Moore <p.f.mo...@gmail.com>: > On 6 February 2018 at 15:23, Eric Fahlgren <ericfahlg...@gmail.com> wrote: > > Right, different planets, but orbiting the same star. I was thinking > about > > the consolidation of the Windows registry layout a year or two ago, don't > > recall who spearheaded that (Steve Dower?). In any case, if the various > > tools either followed that convention, or we came up with an ini-based > one > > that was consistent with it and usable on Unix (.pyconf or something)... > > Yep, that would be an informational PEP, defining standards we expect > Python applications to follow. There's a lot more Python > *applications* than there are Python *distributions*, and I'm not > convinced a standard for applications would get much traction (even > ignoring the need they'd have for backward compatibility) but if > someone wants to try to get consensus on something, then have fun! > > Actually, the `appdirs` project (https://pypi.python.org/pypi/appdirs) > does exactly this - provides a portable interface for applications to > store config data in platform-specific locations. The correct answer > is probably to persuade application developers to use appdirs rather > than their own schemes. > > Pip and py both use appdirs-compatible schemes (py doesn't use appdirs > itself, as it's not written in Python, but pip does). > > pip: appdirs.user_config_dir('pip', appauthor=False, roaming=True) > py: appdirs.user_config_dir() > > You could argue that appdirs offers too many options - but if all > applications used appdirs, you could have that debate once with the > appdirs authors, rather than having to persuade every application in > turn. > > > Yeah, our Windows dev environment uses Cygwin, so I'm constantly > confused. > > :) > > Yuk, Cygwin. I'll refrain from commenting further :-) > > > Not sure how to make pip cough up similar verbose output, but when it > > started complaining about legacy formats, I just followed its directions > and > > this works: > > > >> ll $USERPROFILE/pip/pip.ini > > -rw-r--r-- efahlgren 2017-04-30 15:51 'C:/Users/efahlgren/pip/pip.ini' > > Backward compatibility. When we moved to the Windows-standard > location, we left in fallbacks to the old locations. I've no idea > whether pip sees Cygwin as Windows-like or Unix-like, so anything > could be going on beyond that. > > Paul > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/