def wildcard_match(self, wildcard):
if hasattr(self, 'nkd_fnmatchcase'):
fnmatchcase = self.nkd_fnmatchcase
else:
from fnmatch import fnmatchcase
self.nkd_fnmatchcase = fnmatchcase
return [ x for x in self if fnmatchcase(x, wildcard) ]
#------------------------------------------------------------------------------
# [ multi_wildcard_match method ] (list)
# returns a list of items that match one or more | separated wildcards passed as string
#------------------------------------------------------------------------------
评论列表
文章目录