Case-insensitive globbing

Thomas Philips tkpmep at hotmail.com
Thu Jun 3 12:59:36 EDT 2004


I'm using the function glob from module glob to obtain a list of all
files in a directory that match a pattern. Unfortunately, some
filenames are in upper case, others are in lower case and yet others
are in mixed case. How can I do a case-insenstive glob that picks up
all files that match a string regardless of case? If its any help, I'm
running Python 2.3.4 under Windows XP.

Thomas Philips



More information about the Python-list mailing list