pkgutil.get_importer()

pkgutil.get_importer(path_item)

Retrieve a PEP 302 importer for the given path_item.

The returned importer is cached in sys.path_importer_cache if it was newly created by a path hook.

The cache (or part of it) can be cleared manually if a rescan of sys.path_hooks is necessary.

Changed in version 3.3: Updated to be based directly on importlib rather than relying on the package internal PEP 302 import emulation.

doc_python
2016-10-07 17:40:44
Comments
Leave a Comment

Please login to continue.