Is Unix glob style pattern case sensitive in Python's glob module?
From the glob source code, you can see that it uses os.path.lexists
which is backended with lstat
(falls back to os.path.exists
if lstat
is not available). glob
itself does nothing to alter the case sensitivity. This is determined by the file system on which the file exists.
[aarcher@Arch]: /tmp/test>$ rm -rf * && touch moo[aarcher@Arch]: /tmp/test>$ python -q>>> import glob>>> glob.glob("m*")['moo']>>> glob.glob("M*")[]>>>