3 ms·
Somewhat related, a few weeks ago on Python Bytes I learned that there is a python module that abstracts various directory locations per-platform. For instance,
by hoherd 1y ago
Somewhat related, a few weeks ago on Python Bytes I learned that there is a python module that abstracts various directory locations per-platform. For instance, you can use this module to find the location of the Movies directory, or the cache directory.
For example, on macOS:
>>> appname = "SuperApp"
>>> appauthor = "Acme"
>>> user_config_dir(appname, appauthor)
'/Users/trentm/Library/Application Support/SuperApp'
or in Windows:
>>> user_config_dir(appname, appauthor)
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
https://pypi.org/project/platformdirs https://pypi.org/project/platformdirs
- esafak 1y agoIf any Windows users are interested in this, you could help fix the linked PRs that will close this issue once the Windows aspects are addressed: https://github.com/tox-dev/platformdirs/issues/368 https://github.com/tox-dev/platformdirs/issues/368