(fullname="")
Yield finders for the given module name

    If fullname contains a '.', the finders will be for the package
    containing fullname, otherwise they will be all registered top level
    finders (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 finders are produced.
Yield finders for the given module name
Yield finders for the given module name
def iter_importers(fullname=""):
    """Yield finders for the given module name

    If fullname contains a '.', the finders will be for the package
    containing fullname, otherwise they will be all registered top level
    finders (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 finders are produced.
    """
    if fullname.startswith('.'):
        msg = "Relative module name {!r} not supported".format(fullname)
        raise ImportError(msg)
    if '.' in fullname:
        # Get the containing package's __path__
        pkg_name = fullname.rpartition(".")[0]
        pkg = importlib.import_module(pkg_name)
        path = getattr(pkg, '__path__', None)
        if path is None:
            return
    else:
        yield from sys.meta_path
        path = sys.path
    for item in path:
        yield get_importer(item)
def iter_importers ( fullname = "" ) : if fullname . startswith ( '.' ) : msg = "Relative module name {!r} not supported" . format ( fullname ) raise ImportError ( msg ) if '.' in fullname : # Get the containing package's __path__ pkg_name = fullname . rpartition ( "." ) [ 0 ] pkg = importlib . import_module ( pkg_name ) path = getattr ( pkg , '__path__' , None ) if path is None : return else : yield from sys . meta_path path = sys . path for item in path : yield get_importer ( item )