Jz`f$csSrSSKrSSKrSSKrSSKr/SQrSr\R"SSS9S5rS r S r S r S r S r g)aFilename matching with shell patterns. fnmatch(FILENAME, PATTERN) matches according to the local convention. fnmatchcase(FILENAME, PATTERN) always takes case in account. The functions operate by translating the pattern into a regular expression. They cache the compiled regular expressions for speed. The function translate(PATTERN) returns a regular expression corresponding to PATTERN. (It does not compile it.) N)filterfnmatch fnmatchcase translatecs[RRU5n[RRU5n[X5$)aTest whether FILENAME matches PATTERN. Patterns are Unix shell style: * matches everything ? matches any single character [seq] matches any character in seq [!seq] matches any char not in seq An initial period in FILENAME is not special. Both FILENAME and PATTERN are first case-normalized if the operating system requires it. If you don't want this, use fnmatchcase(FILENAME, PATTERN). )ospathnormcaser)namepat /usr/lib64/python3.13/fnmatch.pyrrs7 77  D !D ''  3 C t !!iT)ZmaxsizeZtypedcs[U[5(a$[US5n[U5n[US5nO [U5n[R "U5R $)Nz ISO-8859-1)Z isinstanceZbytesZstrrreZcompilematch)r Zpat_strZres_strress r _compile_patternr&sN#uc<(G$G\*n ::c?  r csn/n[RRU5n[U5n[R[La+UH#nU"U5(dMUR U5 M% U$UH@nU"[RRU55(dM/UR U5 MB U$)zJConstruct a list from those elements of the iterable NAMES that match PAT.)rrrr posixpathappend)Znamesr Zresultrrs r rr0s F ''  3 C S !E ww) $DT{{ d# $ M $DRWW%%d+,, d# $ Mr cs,[U5nU"U5SL$)zTest whether FILENAME matches PATTERN, including case. This is a version of fnmatch() which doesn't case-normalize its arguments. N)r)rr r r rr@s S !E ;d ""r csD[5n[XS5n[X!5$)z^Translate a shell PATTERN to a regular expression. There is no way to quote meta-characters. .)Zobject _translate_join_translated_parts)r STARZpartsrr rrJs" 8D s# &E !% ..r cs/nURnS[U5peXV:GaXnUS-nUS:XaU(aUSULaU"U5 GOUS:Xa U"U5 GOUS:XGaUnX:a XS:XaUS-nX:a XS:XaUS-nX:aXS:waUS-nX:a XS:waMX:a U"S 5 GOXUn S U ;aU RS S 5n O/n XS:XaUS -OUS-n URS X5n U S:aOU RXU 5 U S-nU S-n M8XUn U (aU RU 5 O U S==S - ss'[ [U 5S- SS5H1n XS- SXS:dMXS- SSXSS-XS- 'X M3 S R SU 55n [ R"SSU 5n US-nU (d U"S5 OXU S:Xa U"S5 OIU SS:Xa SU SS-n OU SS;aS U -n U"SU S35 OU"[ R"U55 XV:aGMXV:XdeU$)NrZ*iZ?[Z!Z]z\[-\\\iic3sd# UH'nURSS5RSS5v M) g7f)rrrz\-N)replace)Z.0Zsr r Z Z_translate..s2%6)*&'YYtU%;%C%CC%O%O%6s.0z([&~|])z\\\1z(?!)r^)rr) rlenrZfindZrangejoinr ZsubZescape) r rZ QUESTION_MARKraddinZcZjZstuffZchunksZkZchunks r rrUs C **C c#hq % F aC 8CG4/D #X   #XAu3aCu3aC%CFcMaC%CFcMvE ae#!MM$6EF"v}!!A#AHHS!/q5! cAh/aCaC  !HE e,r c) "3v;q=!R8*!A#;r?VYq\9*01+cr*:VYqr]*JFQ3K & *  HH%6.4%66Ez7E:aCKc\HQx3 #eABiqZ/ $u !E7! %  !  %@ 6M6 Jr cs/nURnS[U5pTXE:a$XULaU"X5 US- nXE:a XULaMXE:aXULdeUS- nXE:Xa U"S5 OwXULde/nXE:a-XULa&URX5 US- nXE:a XULaM&SRU5nXE:XaU"S5 U"U5 O U"SUS35 XE:aMXE:XdeSRU5nSUS3$) Nrrz.*Zz(?>.*?Z)z(?s:z)\Z)rrr )Zinprrr!r"r#Zfixeds r rrs# C **C c#hq %CF$& CF  Q %CF$& %v~~ Q 6 I vT!!!ed* LL FAed* 6 I J &q! "! %" 6M6 ''#,C3%s r )Z__doc__rrr Z functoolsZ__all__rZ lru_cacherrrrrr)r r r$s^    ;"& U$/!0! #/EP#r