From the official example, I understand that I can modify sys.path before the interpreter initializes using the following code(exception handlings are omitted):
PyConfig config;
PyConfig_InitPythonConfig(&config);
PyConfig_Read(&config);
config.module_search_paths_set = 1;
PyWideStringList_Append(&config.module_search_paths, L"/path/to/module");
Py_InitializeFromConfig(&config);
However, as indicated in the document, starting from python 3.11, PyConfig_Read will not initialize path-related fields in PyConfig. My question is: How can I get the default sys.path before the interpreter initializes? I need this because I want to set module_search_paths in the config and normally I would like to append the path for my custom modules to the default sys.path.
I know that I can set sys.path after initializing the interpreter, but I hope I can do it before the initialization.