docs: def glob(dpath, pattern=None, recursive=False, with_files=True, with_dirs=True,
           maxdepth=None, exclude_dirs=[], fullpath=True, **kwargs):
      r"""
      Globs directory for pattern
  
      DEPRICATED:
          use pathlib.glob instead
  
      Args:
          dpath (str): directory path or pattern
          pattern (str or list): pattern or list of patterns
              (use only if pattern is not in dpath)
          recursive (bool): (default = False)
          with_files (bool): (default = True)
          with_dirs (bool): (default = True)
          maxdepth (None): (default = None)
          exclude_dirs (list): (default = [])
  
      Returns:
          list: path_list
  
      SeeAlso:
          iglob
  
      CommandLine:
          python -m utool.util_path --test-glob
          python -m utool.util_path --exec-glob:1
  
      Example:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_path import *  # NOQA
          >>> from os.path import dirname
          >>> import utool as ut
          >>> dpath = dirname(ut.__file__)
          >>> pattern = '__*.py'
          >>> recursive = True
          >>> with_files = True
          >>> with_dirs = True
          >>> maxdepth = None
          >>> fullpath = False
          >>> exclude_dirs = ['_internal', join(dpath, 'experimental')]
          >>> print('exclude_dirs = ' + ut.repr2(exclude_dirs))
          >>> path_list = glob(dpath, pattern, recursive, with_files, with_dirs,
          >>>                  maxdepth, exclude_dirs, fullpath)
          >>> path_list = sorted(path_list)
          >>> result = ('path_list = %s' % (ut.repr3(path_list),))
          >>> result = result.replace(r'\\', '/')
          >>> print(result)
          path_list = [
              '__init__.py',
              '__main__.py',
              'tests/__init__.py',
          ]
  
      Example:
          >>> # DISABLE_DOCTEST
          >>> from utool.util_path import *  # NOQA
          >>> import utool as ut
          >>> dpath = dirname(ut.__file__) + '/__*.py'
          >>> path_list = glob(dpath)
          >>> result = ('path_list = %s' % (str(path_list),))
          >>> print(result)
      """
      gen = iglob(dpath, pattern, recursive=recursive,
                  with_files=with_files, with_dirs=with_dirs, maxdepth=maxdepth,
                  fullpath=fullpath, exclude_dirs=exclude_dirs, **kwargs)
      path_list = list(gen)
      return path_list