blob: fed6f2c12a1d85683866d3611da0f77a19fe2078 [file] [log] [blame]
Brett Cannon5abdc932009-01-22 22:43:07 +00001"""The machinery of importlib: finders, loaders, hooks, etc."""
2
Brett Cannoncb66eb02012-05-11 12:58:42 -04003import _imp
4
5from ._bootstrap import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
6 OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES)
Brett Cannon5abdc932009-01-22 22:43:07 +00007from ._bootstrap import BuiltinImporter
8from ._bootstrap import FrozenImporter
Nick Coghlanff794862012-08-02 21:45:24 +10009from ._bootstrap import WindowsRegistryFinder
Brett Cannonfa3d1fc2009-02-05 02:52:57 +000010from ._bootstrap import PathFinder
Brett Cannon938d44d2012-04-22 19:58:33 -040011from ._bootstrap import FileFinder
12from ._bootstrap import SourceFileLoader
Marc-Andre Lemburg4fe29c92012-04-25 02:31:37 +020013from ._bootstrap import SourcelessFileLoader
Brett Cannon938d44d2012-04-22 19:58:33 -040014from ._bootstrap import ExtensionFileLoader
Brett Cannoncb66eb02012-05-11 12:58:42 -040015
16EXTENSION_SUFFIXES = _imp.extension_suffixes()
Nick Coghlan76e07702012-07-18 23:14:57 +100017
18def all_suffixes():
19 """Returns a list of all recognized module suffixes for this process"""
20 return SOURCE_SUFFIXES + BYTECODE_SUFFIXES + EXTENSION_SUFFIXES