Viewing File: /opt/alt/python35/lib/python3.5/site-packages/setuptools/__pycache__/glob.cpython-35.pyc



\W@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|d|S)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	/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

ccshtjj|\}}t|s_|rDtjj|r[|Vntjj|r[|VdS|s|rt|rx>t||D]}|VqWnxt||D]}|VqWdS||krt|rt	||}n	|g}t|r|rt|rt}q%t}nt
}x<|D]4}x+|||D]}tjj||VqBWq,WdS)N)ospathsplit	has_magiclexistsisdirrglob2glob1rglob0join)rrdirnamebasenamexdirsZglob_in_dirnamer	r	r
r2s4				
rcCso|s3t|tr*tjjd}n	tj}ytj|}Wntk
r^gSYnXtj||S)NASCII)	
isinstancerrcurdirencodelistdirOSErrorfnmatchfilter)rpatternnamesr	r	r
r]s	
	rcCsN|s"tjj|rJ|gSn(tjjtjj||rJ|gSgS)N)rrrrr)rrr	r	r
rjs
!rccsAt|st|ddVxt|D]}|Vq.WdS)Nr)rr	_rlistdir)rr(rr	r	r
rzsrc
cs|s3t|tr*ttjd}n	tj}ytj|}Wntjk
radSYnXx_|D]W}|V|rtjj||n|}x(t|D]}tjj||VqWqiWdS)Nr )	r!rrr"r$errorrrr*)rr)rryr	r	r
r*s		
!r*z([*?[])s([*?[])cCs:t|tr!tj|}ntj|}|dk	S)N)r!rmagic_check_bytessearchmagic_check)rmatchr	r	r
rsrcCs't|tr|dkS|dkSdS)Ns**z**)r!r)r(r	r	r
rs
rcCsVtjj|\}}t|tr<tjd|}ntjd|}||S)z#Escape all special characters.
    s[\1]z[\1])rr
splitdriver!rr-subr/)rZdriver	r	r
rs
)__doc__rrer&Zsetuptools.extern.sixr__all__rrrrrrr*compiler/r-rrrr	r	r	r
<module>s"+

Back to Directory File Manager