[Python-ideas] Add appdirs module to stdlib

Chris Angelico rosuav at gmail.com
Wed Sep 2 02:47:43 CEST 2015

On Wed, Sep 2, 2015 at 9:05 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> So, in my view:
> 1. We should have something that provides the functionality of appdirs
> in the stdlib.
> 2. It probably needs a PEP to get the corner cases right.
> 3. The behaviour of appdirs is a good baseline default - even if it
> isn't 100% compliant with platform standards it'll be better than what
> someone unfamiliar with the platform will invent.
> 4. We shouldn't abandon the idea just because a perfect solution is
> unattainable.


> There are complex cases to consider (search paths, for example, and
> even worse how search paths interact with the app writing config data
> rather than just reading it, or migration when a scheme changes). The
> PEP should at least mention these cases, but it's not unreasonable to
> simply declare them out of scope of the module (most applications
> don't need anything this complex).

Might be worth starting with something simple: ask for one directory
(the default or most obvious place), or ask for a full list of
plausible directories to try. Then a config manager could be built on
top of that which would handle write location selection, migration,
etc, and that would be a separate proposal that makes use of the
appdata module for the cross-platform stuff.


More information about the Python-ideas mailing list