Currently, it's only possible to specify a module name when using -X presite command line option and PYTHON_PRESITE environment variable: module imported before the site module is imported.
I propose extending the format to accept an entry point format: module_name:function_name; see pkgutil.resolve_name().
Note: the presite option is only available when Python is built in debug mode.
Linked PRs
Currently, it's only possible to specify a module name when using
-X presitecommand line option andPYTHON_PRESITEenvironment variable: module imported before thesitemodule is imported.I propose extending the format to accept an entry point format:
module_name:function_name; see pkgutil.resolve_name().Note: the presite option is only available when Python is built in debug mode.
Linked PRs