pkgutil.iter_importers()

pkgutil.iter_importers(fullname='')

Yield PEP 302 importers for the given module name.

If fullname contains a ‘.’, the importers will be for the package containing fullname, otherwise they will be all registered top level importers (i.e. those on both sys.meta_path and sys.path_hooks).

If the named module is in a package, that package is imported as a side effect of invoking this function.

If no module name is specified, all top level importers are produced.

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.