machinery.py 880 B

1234567891011121314151617181920
  1. """The machinery of importlib: finders, loaders, hooks, etc."""
  2. from ._bootstrap import ModuleSpec
  3. from ._bootstrap import BuiltinImporter
  4. from ._bootstrap import FrozenImporter
  5. from ._bootstrap_external import (SOURCE_SUFFIXES, DEBUG_BYTECODE_SUFFIXES,
  6. OPTIMIZED_BYTECODE_SUFFIXES, BYTECODE_SUFFIXES,
  7. EXTENSION_SUFFIXES)
  8. from ._bootstrap_external import WindowsRegistryFinder
  9. from ._bootstrap_external import PathFinder
  10. from ._bootstrap_external import FileFinder
  11. from ._bootstrap_external import SourceFileLoader
  12. from ._bootstrap_external import SourcelessFileLoader
  13. from ._bootstrap_external import ExtensionFileLoader
  14. from ._bootstrap_external import NamespaceLoader
  15. def all_suffixes():
  16. """Returns a list of all recognized module suffixes for this process"""
  17. return SOURCE_SUFFIXES + BYTECODE_SUFFIXES + EXTENSION_SUFFIXES