Generalize the possibility to configure sys.path with a ._pth file? #92801
Labels
interpreter-core
(Objects, Python, Grammar, and Parser dirs)
type-feature
A feature request or enhancement
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
toModules/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.The text was updated successfully, but these errors were encountered: