💾 Archived View for tris.fyi › pydoc › glob captured on 2023-01-29 at 03:16:09. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-01-08)
-=-=-=-=-=-=-
Filename globbing utility.
escape(pathname) Escape all special characters.
glob(pathname, *, root_dir=None, dir_fd=None, recursive=False) Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories.
glob0(dirname, pattern)
glob1(dirname, pattern)
has_magic(s)
iglob(pathname, *, root_dir=None, dir_fd=None, recursive=False) Return an iterator which yields the paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames starting with a dot are special cases that are not matched by '*' and '?' patterns. If recursive is true, the pattern '**' will match any files and zero or more directories and subdirectories.
magic_check = re.compile('([*?[])')
magic_check_bytes = re.compile(b'([*?[])')