[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Christopher Barker
On Wed, Dec 15, 2021 at 7:35 PM Finn Mason wrote: > 4. Should this also be added to pathlib? I say definitely, probably in the >> form of class constructors (e.g. Path.user_data()). >> > putting it in pathlib makes a lot of sense, but I wouldn't make them a bunch of Path classmethods -- why thot

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Finn Mason
On Wed, Dec 15, 2021, 8:32 PM Finn Mason wrote: > It would be a good idea to add something like appdirs to the stdlib. Maybe > something like os.path.userdata() (as an example name). I have four > questions: > > 1. What should the functions be called, and module should they go in? I > personally

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Finn Mason
It would be a good idea to add something like appdirs to the stdlib. Maybe something like os.path.userdata() (as an example name). I have four questions: 1. What should the functions be called, and module should they go in? I personally say os.path module, with names such as userdata() for consist

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Christopher Barker
On Wed, Dec 15, 2021 at 4:29 PM Christopher Barker wrote: > On Wed, Dec 15, 2021 at 2:57 PM Neil Girdhar > wrote: > >> +1 for appdirs. It's a shame that more projects don't yet use it. >> > I agree -- I've wanted something like that for years in the stdlib. wxPython has wx.StandardPaths -- and

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Neil Girdhar
+1 for appdirs. It's a shame that more projects don't yet use it. On Wednesday, December 15, 2021 at 9:03:07 AM UTC-5 Matt del Valle wrote: > There is appdirs which does precisely what you're looking for: > > https://pypi.org/project/appdirs/ > > That said, it does seem to be a core bit of funct

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Barry
> On 15 Dec 2021, at 13:45, JGoutin via Python-ideas > wrote: > > Hello, > > The idea is to add 3 functions to get "config", "data" and "cache" > directories that are commonly used to store application files in user home / > system. > > This look very straightforward to get theses directo

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread JGoutin via Python-ideas
Hello, Thanks for the suggested packages. "platfromdirs" look to be a fork of "appdirs", both seems to support many OS and cases. That look to be good non stdlib solutions. The "xdg" module seem to only support Linux, but provides more dirs on it. __

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Paul Moore
https://pypi.org/project/platformdirs/ is intended to cover this sort of requirement. Paul On Wed, 15 Dec 2021 at 13:47, JGoutin via Python-ideas wrote: > > Hello, > > The idea is to add 3 functions to get "config", "data" and "cache" > directories that are commonly used to store application fil

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Matt del Valle
There is appdirs which does precisely what you're looking for: https://pypi.org/project/appdirs/ That said, it does seem to be a core bit of functionality that would be nice to have in the os and pathlib modules without needing an external dependency. I'm not going to weigh in on the pros/cons of

[Python-ideas] Re: Applications user/system directories functions

2021-12-15 Thread Evpok Padding
Hi, [xdg](https://pypi.org/project/xdg).xdg_config_home seems to give you the parent of what you need, doesn't it? Cheers, E On Wed, 15 Dec 2021 at 13:47, JGoutin via Python-ideas < python-ideas@python.org> wrote: > Hello, > > The idea is to add 3 functions to get "config", "data" and "cache"