Re: Best practice for config files? (Posting On Python-List Prohibited)

Liste des GroupesRevenir à cl python 
Sujet : Re: Best practice for config files? (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.python
Date : 23. May 2025, 02:20:53
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <100oihl$3ob15$4@dont-email.me>
References : 1 2
User-Agent : Pan/0.162 (Pokrosvk)
On Thu, 22 May 2025 17:37:09 -0700, Paul Rubin wrote:

"Michael F. Stemper" <michael.stemper@gmail.com> writes:
>
Should I specify the location of the config file with a command-line
option, or is requiring the program to be executed in the directory
containing the configuration file considered acceptable practice?
 
You can also use an environment variable.

Remember to follow some reasonable precedence order by which settings
specified one way can be overridden by those specified another way. The
most natural one would seem to be (from highest to lowest)

1) command-line option
2) environment variable
3) user-specific config
4) systemwide config
5) hard-coded

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