Re: Best practice for config files?

Liste des GroupesRevenir à cl python 
Sujet : Re: Best practice for config files?
De : CRhode (at) *nospam* LacusVeris.com (Chuck Rhode)
Groupes : comp.lang.python
Date : 23. May 2025, 14:35:28
Autres entêtes
Message-ID : <20250523083528.4ec97360@BigTimber.LacusVeris.com>
References : 1
User-Agent : Claws Mail 4.1.1 (GTK 3.24.38; x86_64-pc-linux-gnu)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 22 May 2025 14:59:28 -0500
"Michael F. Stemper" <michael.stemper@gmail.com> wrote:

Is requiring the program to be executed in the directory containing
the configuration file considered acceptable practice?

Freedesktop.org proposes a specification for where such things ought
to be located:

+ https://specifications.freedesktop.org/basedir-spec/latest/

Here's how I do it:

def get_xdg_config_home():

    """The configuration directory.

    Normally $HOME/.config.

    """
   
    result = pathlib.Path.home() / ".config"
    return result

- --
.. Be Seeing You,
.. Chuck Rhode, Sheboygan, WI, USA
.. Weather:  https://LacusVeris.com/Wx
.. 47° — Wind NNW at 12 mph. Sky clear.
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQT+MY/5I/LMPSswTbVg2/xipKOWUgUCaDB5oAAKCRBg2/xipKOW
Ukg/AJ9cWxtykecg31HvVrCz+GhWPOn+gQCePacKiSXFlRdkEeyrzksobcbTCFw=
=OzzD
-----END PGP SIGNATURE-----

Date Sujet#  Auteur
22 May 25 * Best practice for config files?11Michael F. Stemper
22 May 25 +* Re: Best practice for config files?6Stefan Ram
22 May 25 i+- Re: Best practice for config files?1Stefan Ram
23 May 25 i+* Re: Best practice for config files?3Stefan Ram
23 May 25 ii`* Re: Best practice for config files? (Posting On Python-List Prohibited)2Lawrence D'Oliveiro
24 May 25 ii `- Re: Best practice for config files? (Posting On Python-List Prohibited)1rbowman
24 May 25 i`- Re: Best practice for config files?1Michael F. Stemper
23 May 25 +* Re: Best practice for config files?2Paul Rubin
23 May 25 i`- Re: Best practice for config files? (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
23 May 25 +- Re: Best practice for config files?1Chuck Rhode
24 May 25 `- Re: Best practice for config files?1Jason H

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal