[Python-ideas] Add appdirs module to stdlib

Robert Collins robertc at robertcollins.net
Wed Sep 2 06:38:05 CEST 2015

On 2 September 2015 at 11:05, Paul Moore <p.f.moore at gmail.com> wrote:
> On 1 September 2015 at 22:47, Andrew Barnert via Python-ideas
> <python-ideas at python.org> wrote:
>> Things like app data and prefs aren't a single directory. XDG has a notion of a search path rather than a single directory; Windows has a notion of separate search domains; OS X makes things as fun as possible by having both. For writing a new file, you're usually fine just writing to the first path in the default domain (as long as it exists or you can create it), but for reading files you're supposed to look in /etc or All Users or whatever if it's not found there. Most cross-platform wrappers I've used in the past didn't deal with this automatically, and a lot of them didn't even make it easy to do manually.
> This is a fair point. But it's also worth noting that the current
> state of affairs for many apps is to just bung stuff in ~/whatever.
> While appdirs may not get things totally right, at least it improves
> things. And if it (or something similar) were in the stdlib, it would
> at least provide a level of uniformity.

In about 5 years time. Maybe,

The adoption curve for something that works on all Pythons is able to
be much much higher than that for something which is only in the
stdlib 6 months (or more) from now. Unless we do a rolling backport of

And if we're going to do that... why? Why not just provide a
documentation link to the thing and say 'pip install this' and/or
'setuptools install_require this'.


Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud

More information about the Python-ideas mailing list