๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ glob.html
glob โ€” Unix style pathname pattern expansion โ€” Python 3.15.2 documentation
The glob module 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.
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_module_glob.asp
Python glob Module
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Training ... import glob import tempfile import os with tempfile.TemporaryDirectory() as d: open(os.path.join(d, "Emil.txt"), "w").close() open(os.path.join(d, "Linus.txt"), "w").close() open(os.path.join(d, "Tobias.py"), "w").close() hits = glob.glob(os.path.join(d, "*.txt")) print(sorted(os.path.basename(x) for x in hits)) Try it Yourself ยป
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ how-to-use-glob-function-to-find-files-recursively-in-python
How to use Glob() Function to Find Files Recursively in Python - GeeksforGeeks
October 3, 2025 - Syntax: glob.glob(pathname, *, recursive=False) glob.iglob(pathname, *, recursive=False) Note: When recursive is set ยท True ยท " ** " followed by path separator ยท ('./**/') will match any files or directories.
๐ŸŒ
Python Module of the Week
pymotw.com โ€บ 2 โ€บ glob
glob โ€“ Filename pattern matching - Python Module of the Week
import glob for name in glob.glob('dir/*'): print name ยท The pattern matches every pathname (file or directory) in the directory dir, without recursing further into subdirectories. $ python glob_asterisk.py dir/file.txt dir/file1.txt dir/file2.txt dir/filea.txt dir/fileb.txt dir/subdir
๐ŸŒ
Python Packaging
packaging.python.org โ€บ en โ€บ latest โ€บ specifications โ€บ glob-patterns
glob patterns - Python Packaging User Guide
Special glob characters: *, ?, ** and character ranges: [] containing only the verbatim matched characters MUST be supported. Within [...], the hyphen indicates a locale-agnostic range (e.g. a-z, order based on Unicode code points).
๐ŸŒ
Python
docs.python.org โ€บ 3.9 โ€บ library โ€บ glob.html
glob โ€” Unix style pathname pattern expansion โ€” Python 3.9.25 documentation
July 8, 2025 - The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are returned in arbitrary order. No tilde expansion is done, but *, ?, and character ranges expressed with [] will be correctly matched.
๐ŸŒ
Real Python
realpython.com โ€บ ref โ€บ stdlib โ€บ glob
glob | Python Standard Library โ€“ Real Python
The Python glob module provides tools to find path names matching specified patterns that follow Unix shell rules.
๐ŸŒ
Note.nkmk.me
note.nkmk.me โ€บ home โ€บ python
How to Use glob() in Python | note.nkmk.me
July 28, 2023 - The first argument to glob() is a path string, which can include special characters like the wildcard *.
๐ŸŒ
Built In
builtin.com โ€บ software-engineering-perspectives โ€บ glob-in-python
Glob in Python Explained | Built In
Glob is a Python module thatโ€™s used to find all file path names that match a specific pattern. Hereโ€™s how to use it.
Find elsewhere
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ python โ€บ glob module โ€บ .glob()
Python | Glob Module | .glob() | Codecademy
June 25, 2022 - The .glob() method returns a list of possible matches for a pathname string. ... Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
๐ŸŒ
PYnative
pynative.com โ€บ home โ€บ python โ€บ python glob: filename pattern matching
Python Glob: Filename Pattern Matching โ€“ PYnative
June 17, 2021 - Syntax of glob() function ยท glob.glob(pathname, *, recursive=False)Code language: Python (python) Python glob.glob() method returns a list of files or folders that matches the path specified in the pathname argument.
๐ŸŒ
Board Infinity
boardinfinity.com โ€บ blog โ€บ glob-in-python-2
Glob() in Python | Board Infinity
July 11, 2023 - We can use the Python generator created by the glob module to list down the files under a given directory. This function also returns an iterator when called, and the iterator returned by it yields the values (list of files) without storing all of the filenames simultaneously. Syntax: Following is the syntax for using the iglob() function of glob module inside a Python program:
๐ŸŒ
TechBeamers
techbeamers.com โ€บ python-glob
Python Glob Module Methods (with Patterns) - TechBeamers
December 30, 2025 - You can use the glob.escape() function to escape special characters in filenames. This is useful when you need to search for files with characters like โ€“ or # in their names. Pythonโ€™s glob module is a powerful tool for file pattern matching and directory traversal.
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ glob() in python
glob() in Python - Scaler Topics
May 4, 2023 - The term โ€œglobโ€ refers to methods for matching files that include specific patterns in line with UNIX shell-related expansion rules. In Python, the glob module is used similarly to find, locate, and search for all of the files that are present in a system.
๐ŸŒ
Michael Currin
michaelcurrin.github.io โ€บ dev-cheatsheets โ€บ cheatsheets โ€บ python โ€บ files-and-paths โ€บ glob.html
Glob | Dev Cheatsheets
Cheatsheets / Python / Files and paths / Glob ยท See also the globbing in the Shell section of this guide. glob in the Python 3 docs. From this StackOverflow page, where my answer was the highest voted. Provide a path as a single argument. You get results as absolute paths.
๐ŸŒ
Wikipedia
en.wikipedia.org โ€บ wiki โ€บ Glob_(programming)
glob (programming) - Wikipedia
3 days ago - Also supported by the JavaScript libraries and Python's glob. The original DOS was a clone of CP/M designed to work on Intel's 8088 and 8086 processors. Windows shells, following DOS, do not traditionally perform any glob expansion in arguments passed to external programs. Shells may use an expansion for their own builtin commands: Windows PowerShell has all the common syntax ...
๐ŸŒ
Learn By Example
learnbyexample.org โ€บ python-glob-glob-function
Python glob.glob() Function - Learn By Example
April 14, 2024 - Recursive Search: When recursive is set to True, ** will match any files and zero or more directories, subdirectories, and symbolic links to directories. For example, glob.glob("**/*.txt", recursive=True) will match .txt files in all subdirectories.
๐ŸŒ
Georgefox
cs.georgefox.edu โ€บ hs_contest โ€บ docs โ€บ python-3.10.12-docs โ€บ library โ€บ glob.html
glob โ€” Unix style pathname pattern expansion โ€” Python 3.10.12 documentation
The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are returned in arbitrary order. No tilde expansion is done, but *, ?, and character ranges expressed with [] will be correctly matched.
๐ŸŒ
Python
docs.python.org โ€บ 3.8 โ€บ library โ€บ glob.html
glob โ€” Unix style pathname pattern expansion โ€” Python 3.8.20 documentation
September 8, 2024 - The glob module finds all the pathnames matching a specified pattern according to the rules used by the Unix shell, although results are returned in arbitrary order. No tilde expansion is done, but *, ?, and character ranges expressed with [] will be correctly matched.