(self, fullname, target=None)
return None
Try to find a spec for the specified module.

        Returns the matching spec, or None if not found.
Try to find a spec for the specified module.
Try to find a spec for the specified module .
def find_spec(self, fullname, target=None):
        """Try to find a spec for the specified module.

        Returns the matching spec, or None if not found.
        """
        is_namespace = False
        tail_module = fullname.rpartition('.')[2]
        try:
            mtime = _path_stat(self.path or _os.getcwd()).st_mtime
        except OSError:
            mtime = -1
        if mtime != self._path_mtime:
            self._fill_cache()
            self._path_mtime = mtime
        # tail_module keeps the original casing, for __file__ and friends
        if _relax_case():
            cache = self._relaxed_path_cache
            cache_module = tail_module.lower()
        else:
            cache = self._path_cache
            cache_module = tail_module
        # Check if the module is the name of a directory (and thus a package).
        if cache_module in cache:
            base_path = _path_join(self.path, tail_module)
            for suffix, loader_class in self._loaders:
                init_filename = '__init__' + suffix
                full_path = _path_join(base_path, init_filename)
                if _path_isfile(full_path):
                    return self._get_spec(loader_class, fullname, full_path, [base_path], target)
            else:
                # If a namespace package, return the path if we don't
                #  find a module in the next section.
                is_namespace = _path_isdir(base_path)
        # Check for a file w/ a proper suffix exists.
        for suffix, loader_class in self._loaders:
            try:
                full_path = _path_join(self.path, tail_module + suffix)
            except ValueError:
                return None
            _bootstrap._verbose_message('trying {}', full_path, verbosity=2)
            if cache_module + suffix in cache:
                if _path_isfile(full_path):
                    return self._get_spec(loader_class, fullname, full_path,
                                          None, target)
        if is_namespace:
            _bootstrap._verbose_message('possible namespace for {}', base_path)
            spec = _bootstrap.ModuleSpec(fullname, None)
            spec.submodule_search_locations = [base_path]
            return spec
        return None
def find_spec ( self , fullname , target = None ) : is_namespace = False tail_module = fullname . rpartition ( '.' ) [ 2 ] try : mtime = _path_stat ( self . path or _os . getcwd ( ) ) . st_mtime except OSError : mtime = - 1 if mtime != self . _path_mtime : self . _fill_cache ( ) self . _path_mtime = mtime # tail_module keeps the original casing, for __file__ and friends if _relax_case ( ) : cache = self . _relaxed_path_cache cache_module = tail_module . lower ( ) else : cache = self . _path_cache cache_module = tail_module # Check if the module is the name of a directory (and thus a package). if cache_module in cache : base_path = _path_join ( self . path , tail_module ) for suffix , loader_class in self . _loaders : init_filename = '__init__' + suffix full_path = _path_join ( base_path , init_filename ) if _path_isfile ( full_path ) : return self . _get_spec ( loader_class , fullname , full_path , [ base_path ] , target ) else : # If a namespace package, return the path if we don't #  find a module in the next section. is_namespace = _path_isdir ( base_path ) # Check for a file w/ a proper suffix exists. for suffix , loader_class in self . _loaders : try : full_path = _path_join ( self . path , tail_module + suffix ) except ValueError : return None _bootstrap . _verbose_message ( 'trying {}' , full_path , verbosity = 2 ) if cache_module + suffix in cache : if _path_isfile ( full_path ) : return self . _get_spec ( loader_class , fullname , full_path , None , target ) if is_namespace : _bootstrap . _verbose_message ( 'possible namespace for {}' , base_path ) spec = _bootstrap . ModuleSpec ( fullname , None ) spec . submodule_search_locations = [ base_path ] return spec return None