On 2/6/21, Inada Naoki <[email protected]> wrote:
>
> If adding option to pyvenv.cfg is not make sense, we can add
> `python.ini` to same place pyvenv.cfg. i.e., directory containing
> python.exe, or one above directory.

I'd rather look for "python.cfg" in the directory of the base
executable (e.g. "C:\Program Files\Python310") and then in the
directory of "pyvenv.cfg", if the latter is found. I wouldn't want it
to check for "python.cfg" in the parent directory of the base
executable.

> And no need for all installations, and per-user setting.
> Environment variable is that already.

A configuration file in a profile data directory can target a
particular version, such as
"%LocalAppData%\Python\Python310-32\python.cfg". This is more flexible
for the user to override a system installation, compared to setting
PYTHONUTF8. However, it's not a major issue if you don't want to
support the extra flexibility.

That said, supporting %ProgramData% and %LocalAppData% data
directories is more consistent with how this feature would be
implemented in POSIX, such as "/etc/python3.10/python.cfg" and
"$HOME/.config/python310/python.cfg". I think that matters because
this file would be a good place to set defaults for all -X options
(e.g. "utf8", "pycache_prefix", "faulthandler").
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/3QGOQTRJTHQPQ5MQ2URCKKYBKASMAEH2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to