tox-dev / platformdirs

A small Python module for determining appropriate platform-specific dirs, e.g. a "user data dir".
https://platformdirs.readthedocs.io
MIT License
568 stars 49 forks source link

HOME and StartMenu? #235

Open newville opened 11 months ago

newville commented 11 months ago

Thanks very much for this work.

I am wondering why a few locations that might be generally useful and not included.

First, there is no value for the HOME directory, perhaps akin to or even equivalent to pathlib.Path().home() or os.path.expanduser(). I get that this can be found in other ways most of the time, but isn't that implied "but maybe not always in s a consistent manner" sort of the point here?

Second, there is no value for user entries to the Start Menu (roughly $HOME/.local/share/applications on Linux, or CSIDL_PROGRAMS on Windows, but non-existent for macOS, and I don't know about others).

These would both be very useful for a project of mine: https://github.com/newville/pyshortcuts. There, we sort of solve for these on Linux/macOS/Windows, but maybe those would be better supported here.

Are these omissions intentional? I didn't see a clear list of "yes, these, not those", but maybe I missed that. Would these be welcome additions or seen as distractions or perhaps difficult to support?
Apologies if these have been discussed and decided on before, or if this is the wrong forum for such a discussion.

Thanks.

gaborbernat commented 11 months ago

First, there is no value for the HOME directory, perhaps akin to or even equivalent to pathlib.Path().home() or os.path.expanduser(). I get that this can be found in other ways most of the time, but isn't that implied "but maybe not always in s a consistent manner" sort of the point here?

There's a stdlib for this, so not needed a 3rd party.

Second, there is no value for user entries to the Start Menu (roughly $HOME/.local/share/applications on Linux, or CSIDL_PROGRAMS on Windows, but non-existent for macOS, and I don't know about others).

PR welcome for this.