When defining a place for config files, cache files, and so on, people usually hack around in a OS-dependent, misinformed, and therefore wrong way.

Thanks to the tempfile API we at least don’t see people hardcoding /tmp/ too much.

There is a beautiful little module that does things right and is easy to use: appdirs

TI think this is a *really* good candidate for the stdlib since this functionality is useful for everything that needs a cache or config (so not only GUI and CLI applications, but also scripts that download and cache stuff from the internet for faster re-running)

probably we should build the API around pathlib, since i found myself not touching os.path with a barge pole since pathlib exists.

i’ll write a PEP about this soon :)