Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize the possibility to configure sys.path with a ._pth file? #92801

Open
fcollot opened this issue May 14, 2022 · 0 comments
Open

Generalize the possibility to configure sys.path with a ._pth file? #92801

fcollot opened this issue May 14, 2022 · 0 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@fcollot
Copy link

fcollot commented May 14, 2022

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.

@fcollot fcollot added the type-feature A feature request or enhancement label May 14, 2022
@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants