PyDocs

Nav

Importing Modules

iter_modules

pkgutil

function (source)
  • iter_modules(path=None, prefix='')
Yields ModuleInfo for all submodules on path,
or, if path is None, all top-level modules on sys.path.

'path' should be either None or a list of paths to look for
modules in.

'prefix' is a string to output on the front of every module name
on output.
Changed in 3.3
  • 3.3: Updated to be based directly on importlib rather than relying on the package internal PEP 302 import emulation.
0 Examples
No examples for pkgutil/iter_modules.
See Also
No see-alsos for pkgutil/iter_modules
0 Notes
No notes for iter_modules