ID EN
Glob

glob

Python 3.11

Return a possibly empty list of path names that match pathname, which must be a string containing a path specification. pathname can be either absolute (like /usr/src/Python-1.5/Makefile) or relative (like ../../Tools/*/*.gif), and can contain shell-style wildcards. Broken symlinks are included in the results (as in the shell). Whether or not the results are sorted depends on the file system. If a file that satisfies conditions is removed or added during the call of this function, whether a path name for that file be included is unspecified.

Syntax

PYTHON
glob.glob(pathname, *, root_dir=None, dir_fd=None, recursive=False, include_hidden=False)

See Also

path-like object glob() paths relative to directory descriptors os.sep os.altsep auditing event auditing event