³ò žl‡Jc@svdZddkZddkZddkZddgZd„Zd„Zd„Zd„Zei d ƒZ d „Z dS( sFilename globbing utility.iÿÿÿÿNtglobtiglobcCstt|ƒƒS(sReturn a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. (tlistR(tpathname((s/sys/lib/python/glob.pyR sccst|ƒp$tii|ƒo |VndSntii|ƒ\}}|p*xtti|ƒD] }|VqcWdSnt|ƒot|ƒ}n |g}t|ƒo t}nt}x<|D]4}x+|||ƒD]}tii ||ƒVqÚWqÄWdS(sReturn a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. N( t has_magictostpathtlexiststsplittglob1tcurdirRtglob0tjoin(Rtdirnametbasenametnametdirst glob_in_dir((s/sys/lib/python/glob.pyRs*       cCs{|p ti}nyti|ƒ}Wntij o gSnX|ddjotd„|ƒ}nti||ƒS(Nit.cSs|ddjS(iR((tx((s/sys/lib/python/glob.pyt8s(RR tlistdirterrortfiltertfnmatch(R tpatterntnames((s/sys/lib/python/glob.pyR 0s  cCs`|djo"tii|ƒo |gSq\n.tiitii||ƒƒo |gSngS(Nt(RRtisdirRR (R R((s/sys/lib/python/glob.pyR ;s  " s[*?[]cCsti|ƒdj S(N(t magic_checktsearchtNone(ts((s/sys/lib/python/glob.pyRIs( t__doc__RRtret__all__RRR R tcompileRR(((s/sys/lib/python/glob.pyss