Lines Matching refs:pat
24 def fnmatch(name, pat): argument
42 pat = os.path.normcase(pat)
43 return fnmatchcase(name, pat)
45 def filter(names, pat): argument
49 pat=os.path.normcase(pat)
51 re_pat = _cache[pat]
53 res = translate(pat)
56 _cache[pat] = re_pat = re.compile(res)
69 def fnmatchcase(name, pat): argument
77 re_pat = _cache[pat]
79 res = translate(pat)
82 _cache[pat] = re_pat = re.compile(res)
85 def translate(pat): argument
91 i, n = 0, len(pat)
94 c = pat[i]
102 if j < n and pat[j] == '!':
104 if j < n and pat[j] == ']':
106 while j < n and pat[j] != ']':
111 stuff = pat[i:j].replace('\\','\\\\')