In the middle of the desert you can say anything you want

21 Feb 2023

Windows has case-insensitive filenames and using fnmatch for not-filenames fails

Adventures in cross-platform programming: I used fnmatch to basically simulate globs in a place where regexes were overkill, but not for filenames.

On windows, paths are case insensitive and therefore fnmatch is case insensitive too, leading to unexpected behaviour.

fnmatchcase() is case-sensitive regardless of OS.

Nel mezzo del deserto posso dire tutto quello che voglio.