FAQ

On 1 September 2015 at 18:00, Philipp A. wrote:
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 :)

This sounds like a reasonable idea to me, and we can point folks to
the original appdirs if they need a version-independent alternative.


Depending on the amount of code involved, we could potentially
consider providing this as an API *in* pathlib, rather than needing an
entire new module for the standard library version of it.


Regards,
Nick.


--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

People

Translate

site design / logo © 2017 Grokbase