blob: 3fe0b11017578f38824ad9e332788419118822ad [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
Brett Cannonfa3d1fc2009-02-05 02:52:57 +00009from ._bootstrap import PathFinder
Brett Cannon938d44d2012-04-22 19:58:33 -040010from ._bootstrap import FileFinder
11from ._bootstrap import SourceFileLoader
Marc-Andre Lemburg4fe29c92012-04-25 02:31:37 +020012from ._bootstrap import SourcelessFileLoader
Brett Cannon938d44d2012-04-22 19:58:33 -040013from ._bootstrap import ExtensionFileLoader
Brett Cannoncb66eb02012-05-11 12:58:42 -040014
15EXTENSION_SUFFIXES = _imp.extension_suffixes()
Nick Coghlan76e07702012-07-18 23:14:57 +100016
17def all_suffixes():
18 """Returns a list of all recognized module suffixes for this process"""
19 return SOURCE_SUFFIXES + BYTECODE_SUFFIXES + EXTENSION_SUFFIXES