[Python-ideas] Possible Enhancement to py Launcher - set default
Paul Moore
p.f.moore at gmail.com
Tue Feb 6 10:44:45 EST 2018
On 6 February 2018 at 15:23, Eric Fahlgren <ericfahlgren at 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
More information about the Python-ideas
mailing list