nodes: 0, module; 1, function_definition; 2, function_name:glob; 3, parameters; 4, block; 5, identifier:dpath; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, default_parameter; 13, dictionary_splat_pattern; 14, expression_statement; 15, expression_statement; 16, expression_statement; 17, return_statement; 18, identifier:pattern; 19, None; 20, identifier:recursive; 21, False; 22, identifier:with_files; 23, True; 24, identifier:with_dirs; 25, True; 26, identifier:maxdepth; 27, None; 28, identifier:exclude_dirs; 29, list; 30, identifier:fullpath; 31, True; 32, identifier:kwargs; 33, comment: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)
      """; 34, assignment; 35, assignment; 36, identifier:path_list; 37, identifier:gen; 38, call; 39, identifier:path_list; 40, call; 41, identifier:iglob; 42, argument_list; 43, identifier:list; 44, argument_list; 45, identifier:dpath; 46, identifier:pattern; 47, keyword_argument; 48, keyword_argument; 49, keyword_argument; 50, keyword_argument; 51, keyword_argument; 52, keyword_argument; 53, dictionary_splat; 54, identifier:gen; 55, identifier:recursive; 56, identifier:recursive; 57, identifier:with_files; 58, identifier:with_files; 59, identifier:with_dirs; 60, identifier:with_dirs; 61, identifier:maxdepth; 62, identifier:maxdepth; 63, identifier:fullpath; 64, identifier:fullpath; 65, identifier:exclude_dirs; 66, identifier:exclude_dirs; 67, identifier:kwargs
code: 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