glob.glob(pathname, *, recursive=False)
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).
If recursive is true, the pattern “**
” will match any files and zero or more directories and subdirectories. If the pattern is followed by an os.sep
, only directories and subdirectories match.
Note
Using the “**
” pattern in large directory trees may consume an inordinate amount of time.
Changed in version 3.5: Support for recursive globs using “**
”.
Please login to continue.