Viewing File: /usr/lib/python3.6/site-packages/setuptools/__pycache__/glob.cpython-36.pyc

3

XohW@sdZddlZddlZddlZddlmZdddgZdddZdd	dZd
dZ	dd
Z
ddZddZddZ
ejdZejdZddZddZddZdS)z
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.

Changes include:
 * `yield from` and PEP3102 `*` removed.
 * `bytes` changed to `six.binary_type`.
 * Hidden files are not ignored.
N)binary_typeglobiglobescapeFcCstt||dS)ayReturn a list of paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    )	recursive)listr)pathnamerr	/usr/lib/python3.6/glob.pyrscCs,t||}|r(t|r(t|}|s(t|S)aReturn an iterator which yields the paths matching a pathname pattern.

    The pattern may contain simple shell-style wildcards a la
    fnmatch. However, unlike fnmatch, filenames starting with a
    dot are special cases that are not matched by '*' and '?'
    patterns.

    If recursive is true, the pattern '**' will match any files and
    zero or more directories and subdirectories.
    )_iglob_isrecursivenextAssertionError)rritsr	r	r
r s


ccstjj|\}}t|sF|r0tjj|rB|Vntjj|rB|VdS|s|rrt|rrx4t||D]
}|VqbWnxt||D]
}|Vq~WdS||krt|rt	||}n|g}t|r|rt|rt}qt}nt
}x0|D](}x"|||D]}tjj||VqWqWdS)N)ospathsplit	has_magiclexistsisdirrglob2glob1rglob0join)rrdirnamebasenamexdirsZglob_in_dirnamer	r	r
r2s4

rcCsR|s"t|trtjjd}ntj}ytj|}Wntk
rDgSXtj||S)NASCII)	
isinstancerrcurdirencodelistdirOSErrorfnmatchfilter)rpatternnamesr	r	r
r]s
rcCs8|stjj|r4|gSntjjtjj||r4|gSgS)N)rrrrr)rrr	r	r
rjsrccs6t|st|ddVxt|D]
}|Vq$WdS)Nr)rr	_rlistdir)rr(rr	r	r
rzsrc
cs|s"t|trttjd}ntj}ytj|}Wntjk
rFdSXxJ|D]B}|V|rjtjj||n|}x t|D]}tjj||VqxWqNWdS)Nr )	r!rrr"r$errorrrr*)rr)rryr	r	r
r*s

r*z([*?[])s([*?[])cCs(t|trtj|}n
tj|}|dk	S)N)r!rmagic_check_bytessearchmagic_check)rmatchr	r	r
rs

rcCst|tr|dkS|dkSdS)Ns**z**)r!r)r(r	r	r
rs
rcCs<tjj|\}}t|tr(tjd|}ntjd|}||S)z#Escape all special characters.
    s[\1]z[\1])rr
splitdriver!rr-subr/)rZdriver	r	r
rs

)F)F)__doc__rrer&Zsetuptools.extern.sixr__all__rrrrrrr*compiler/r-rrrr	r	r	r
<module>s"


+



Back to Directory File Manager