While official Python documentation mentions where py.ini can be loaded from and what you can configure inside, the unix python-launcher does not see to have any support for it, or lacks documentation.
I reached this while trying to configure py on macos to prefer using the latest release of python instead of using the latest pre-release (which obviously does not work with most tools).
I created a py.ini in user home with expected config but it was not loaded. Should I assume that python-launcher already knowns to use XDG standard. (XDG_CONFIG_HOME) and look for confing in ~/.config/py.ini or similar? I tried to run with verbose mode but apparently --list does not even accept that argument.
$ py --list -vv
The `--list` flag must be specified on its own; see `py --help` for details
FAIL: 64
Later I found that export PYLAUNCH_DEBUG=1 added some extra debugging info and I attempted to trick py to default to another version of python using the documented environment variables:
export PY_PYTHON=3.11
export PY_PYTHON3=3.11
While this works, I still think that lack of config file support is a bug, probably the missing -v too.
While official Python documentation mentions where
py.ini
can be loaded from and what you can configure inside, the unix python-launcher does not see to have any support for it, or lacks documentation.I reached this while trying to configure
py
on macos to prefer using the latest release of python instead of using the latest pre-release (which obviously does not work with most tools).I created a
py.ini
in user home with expected config but it was not loaded. Should I assume that python-launcher already knowns to use XDG standard. (XDG_CONFIG_HOME) and look for confing in~/.config/py.ini
or similar? I tried to run with verbose mode but apparently--list
does not even accept that argument.Later I found that
export PYLAUNCH_DEBUG=1
added some extra debugging info and I attempted to trick py to default to another version of python using the documented environment variables:While this works, I still think that lack of config file support is a bug, probably the missing
-v
too.