mς %U²Ic@sXdZdkZdkZdkZdgZd„Zd„ZeidƒZd„Z dS(sFilename globbing utility.NtglobcCsbt|ƒp&tii|ƒo |gSq3gSntii|ƒ\}}|ptti |ƒSn't|ƒot |ƒ}n |g}t|ƒprg}xΌ|D]]}|ptii |ƒo=tii||ƒ}tii|ƒo|i|ƒqq¦q¦WnTg}xJ|D]B}t||ƒ}x*|D]"}|itii||ƒƒq4WqW|S(sReturn a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. N(t has_magictpathnametostpathtlexiststsplittdirnametbasenametglob1tcurdirRtlisttresulttisdirtjointnametappendtsublist(RRRR RR R((t!/data/zmath/lib/python2.4/glob.pyR s6     $cCs{|p ti}nyti|ƒ}Wntij o gSnX|ddjotd„|ƒ}nti||ƒS(Nit.cCs|ddjS(NiR(tx(R((Rt1s( RRR tlistdirtnamesterrortpatterntfiltertfnmatch(RRR((RR *s  s[*?[]cCsti|ƒdj S(N(t magic_checktsearchtstNone(R((RR7s( t__doc__RRtret__all__RR tcompileRR(R"RRRR!RRR ((Rt?s     !