code: def iglob(pathname):
      
      if not has_magic(pathname):
          yield pathname
          return
      dirname, basename = os.path.split(pathname)
      if not dirname:
          for name in glob1(dirname, basename):
              yield name
          return
      if has_magic(dirname):
          dirs = iglob(dirname)
      else:
          dirs = [dirname]
      if has_magic(basename):
          glob_in_dir = glob1
      else:
          glob_in_dir = glob0
      for dirname in dirs:
          for name in glob_in_dir(dirname, basename):
              yield os.path.join(dirname, name)
docs: Return an iterator which yields the paths matching a pathname pattern.
  
      The pattern may contain simple shell-style wildcards a la fnmatch.