Say that in Python I load a module that changes the sys.path
. Would that change the loader's sys.path
as well? If it does, is there any way to make sure that I can restore it later?
And what about the opposite scenario? Say the loader makes a change to sys.path
before loading the module. Would the module see the regular sys.path
(i.e. PYTHONPATH
, etc.), or would it see the new sys.path
?