LEFT | RIGHT |
1 """Core implementation of path-based import. | 1 """Core implementation of path-based import. |
2 | 2 |
3 This module is NOT meant to be directly imported! It has been designed such | 3 This module is NOT meant to be directly imported! It has been designed such |
4 that it can be bootstrapped into Python as the implementation of import. As | 4 that it can be bootstrapped into Python as the implementation of import. As |
5 such it requires the injection of specific modules and attributes in order to | 5 such it requires the injection of specific modules and attributes in order to |
6 work. One should use importlib as the public-facing version of this module. | 6 work. One should use importlib as the public-facing version of this module. |
7 | 7 |
8 """ | 8 """ |
9 # | 9 # |
10 # IMPORTANT: Whenever making changes to this module, be sure to run | 10 # IMPORTANT: Whenever making changes to this module, be sure to run |
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 | 1436 |
1437 | 1437 |
1438 def _install(_bootstrap_module): | 1438 def _install(_bootstrap_module): |
1439 """Install the path-based import components.""" | 1439 """Install the path-based import components.""" |
1440 _setup(_bootstrap_module) | 1440 _setup(_bootstrap_module) |
1441 supported_loaders = _get_supported_file_loaders() | 1441 supported_loaders = _get_supported_file_loaders() |
1442 sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)]) | 1442 sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)]) |
1443 if _os.__name__ == 'nt': | 1443 if _os.__name__ == 'nt': |
1444 sys.meta_path.append(WindowsRegistryFinder) | 1444 sys.meta_path.append(WindowsRegistryFinder) |
1445 sys.meta_path.append(PathFinder) | 1445 sys.meta_path.append(PathFinder) |
LEFT | RIGHT |