abcd wrote: > I am using fnmatch.fnmatch to find some files. The only problem I have > is that it only takes one pattern...so if I want to search using > multiple patterns I have to do something like.... > > patterns = ['abc*.txt', 'foo*'] > > for p in patterns: > if fnmatch.fnmatch(some_file_name, p): > return True
I don't see anything in the fnmatch and glob modules... but I didn't look very hard because what the heck is wrong with the four line solution you have? Looks fine to me. -- Brian Beck Adventurer of the First Order -- http://mail.python.org/mailman/listinfo/python-list