FWIW and as a real use case: For eGenix PyRun, I need a way to access some of the Python config settings in Python and after having initialized the interpreter (essentially, all settings which can be set from the Python command line or via env vars). Both for reading and writing.
Before 3.11, I could do this via accessing the global config variables from C. Since 3.11, this no longer works. I can either hack my own APIs and patch the interpreter, but I’d prefer to use standard Python C APIs for this or at least have ways of setting the parameters via the sys
module.
In the current eGenix PyRun, I have to initialize the CPython runtime using Python, since the frozen main entry point does not use the command line parsing of the regular main()
function.