Primary
glob ⚬⃕ᵖʸ|Documentation|1st|20251021000106-00-⌔
glob — Unix style pathname pattern expansion — Python 3 documentation
glob— Unix style pathname pattern expansionSource code: Lib/glob.py
The
globmodule finds pathnames using pattern matching rules similar to the Unix shell. No tilde expansion is done, but﹡,?, and character ranges expressed with[]will be correctly matched. This is done by using theos.scandir()andfnmatch.fnmatch()functions in concert, and not by actually invoking a subshell.Note: The pathnames are returned in no particular order. If you need a specific order, sort the results.
Files beginning with a dot (
.) can only be matched by patterns that also start with a dot, unlikefnmatch.fnmatch()orpathlib.Path.glob(). For tilde and shell variable expansion, useos.path.expanduser()andos.path.expandvars().For a literal match, wrap the meta-characters in brackets. For example,
'[?]'matches the character'?'.The
globmodule defines the following functions:Printed 2026-06-28.
(echo:: @ ᯤ)
Link to original
Secondary
• • •