Import
Glob on strings
Test whether the string matches the pattern.
pythonfnmatch.fnmatch('notes.txt', '*.txt') # True
fnmatch.fnmatch('notes.txt', '*.png') # False
Get a list of matched elements.
pythonfnmatch.filter(['notes.txt', 'image.png'], '*.txt') # ['notes.txt']