def checkpath_iter(self, fullname):
for dirpath in sys.path:
# if the value in sys.path_importer_cache is None, then this
# path *should* be imported by the builtin mechanism, and the
# entry is thus a path to a directory on the filesystem;
# if it's not None, then some other importer is in charge, and
# it probably isn't even a filesystem path
if sys.path_importer_cache.get(dirpath,False) is None:
checkpath = os.path.join(
dirpath,'%s.%s' % (fullname,self.suffix))
yield checkpath
评论列表
文章目录