Open
Description
On Windows it is possible, for embedding purposes, to use a ._pth file alongside the Python executable or shared library to override the path configuration at startup (https://docs.python.org/3/using/windows.html#finding-modules).
I've ported the Windows-specific code from PC/getpathp.c
to Modules/getpath.c
on my fork, as we need this functionality on all platforms. If you think this feature would be accepted I would be happy to clean the code and submit a PR.