[Python-ideas] Add appdirs module to stdlib

Steven D'Aprano steve at pearwood.info
Fri Sep 4 03:43:02 CEST 2015


On Wed, Sep 02, 2015 at 04:38:05PM +1200, Robert Collins wrote:

> 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'.

I can think of two reasons, one minor, one major:

1.  Many people behind corporate or school firewalls cannot just "pip 
install this". By "firewall" I'm talking more figuratively than 
literally. Of course there may be an actual firewall blocking access to 
PyPI, but that's typically very easy to bypass (download the library at 
home and bring it in on a USB stick). Less easy to bypass is corporate/ 
school policy which prohibits the installation of unapproved software, 
often being a firing or expulsion offense. Getting approval may be 
difficult, slow or downright impossible.

However, what makes this a minor reason is that software written under 
those conditions probably won't be distributed outside of the 
organisation itself, so who cares whether it complies with the standard 
locations for application data?

2.  More importantly is the stdlib itself. As someone has pointed out, 
the stdlib already drops config files in completely inappropriate 
locations on Windows, e.g. $HOME/.idlelib. It would be good if the 
stdlib itself could consistently use the standard locations for files.


-- 
Steve


More information about the Python-ideas mailing list