On this page
fnmatch.fnmatchcase
Prev: fnmatch.fnmatch | Up: fnmatch | Next: fnmatch.translate
Rel: fnmatch.filter, fnmatch.filterfalse, fnmatch.fnmatch, fnmatch.translate
Ref: docs.python.org — fnmatch.fnmatchcase
Tags: #public #python3 #stdlib #fnmatch
Import
import fnmatch
from fnmatch import fnmatchcase
Signature & Overview
fnmatch.fnmatchcase(name, pat)
Test whether FILENAME matches PATTERN, including case.
Usage
import fnmatch
assert fnmatch.fnmatchcase("README.md", "*.md") is True
assert fnmatch.fnmatchcase("README.MD", "*.md") is False
Gotchas
- Always case-sensitive on every OS: Prefer
fnmatchcase()overfnmatch()when consistent cross-platform behavior matters.
REPL Inspect
from fnmatch import fnmatchcase
help(fnmatchcase)
Linked from
Related notes
- tuts/python3/stdlib_module/fnmatch/filter Linked here; links to this page; shared tags: #fnmatch, #stdlib
- tuts/python3/stdlib_module/fnmatch/filterfalse Linked here; links to this page; shared tags: #fnmatch, #stdlib
- tuts/python3/stdlib_module/fnmatch/fnmatch Linked here; links to this page; shared tags: #fnmatch, #stdlib
- tuts/python3/stdlib_module/fnmatch/translate Linked here; links to this page; shared tags: #fnmatch, #stdlib
- tuts/python3/stdlib_module/fnmatch links to this page; shared tags: #stdlib
- tuts/c/stdlib shared tags: #stdlib
- tuts/c/stdlib/assert shared tags: #stdlib
- tuts/c/stdlib/assert/assert shared tags: #stdlib
- tuts/c/stdlib/assert/static_assert shared tags: #stdlib
- tuts/c/stdlib/ctype shared tags: #stdlib