• File: glob.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib/python3.7/site-packages/setuptools/__pycache__/glob.cpython-37.pyc
  • Date Modified: 11/13/2023 9:30 PM
  • File size: 3.57 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

mRe	@sdZddlZddlZddlZdddgZdddZdddZd	d
ZddZd
dZ	ddZ
ddZedZ
edZddZddZddZdS)z
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.

Changes include:
 * `yield from` and PEP3102 `*` removed.
 * Hidden files are not ignored.
NglobiglobescapeFcCstt||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@/opt/alt/python37/lib/python3.7/site-packages/setuptools/glob.pyrscCs*t||}|r&t|r&t|}|r&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)rritsrrr	rs

ccstj|\}}|r t|r tnt}t|sZ|rDtj|rV|Vntj|rV|VdS|sr|||EdHdS||krt|rt	||}n|g}t|st
}x0|D](}x"|||D]}tj||VqWqWdS)N)ospathsplitrglob2glob1	has_magiclexistsisdirr
glob0join)rrdirnamebasenameZglob_in_dirdirsnamerrr	r
0s(
r
cCsR|s"t|trtjd}ntj}yt|}Wntk
rDgSXt||S)NASCII)	
isinstancebytesrcurdirencodelistdirOSErrorfnmatchfilter)rpatternnamesrrr	rTs
rcCs8|stj|r4|gSntjtj||r4|gSgS)N)rrrrr)rrrrr	rasrccs6t|st|ddVxt|D]
}|Vq$WdS)Nr)rr
	_rlistdir)rr'xrrr	rqsrccs|s"t|trtjd}ntj}yt|}Wntjk
rFdSXxJ|D]B}|V|rjtj||n|}x t	|D]}tj||VqxWqNWdS)Nr)
rr rr!r"r#errorrrr))rr(r*ryrrr	r)ys

r)z([*?[])s([*?[])cCs(t|trt|}n
t|}|dk	S)N)rr magic_check_bytessearchmagic_check)rmatchrrr	rs

rcCst|tr|dkS|dkSdS)Ns**z**)rr )r'rrr	rs
rcCs<tj|\}}t|tr(td|}ntd|}||S)z#Escape all special characters.
    s[\1]z[\1])rr
splitdriverr r-subr/)rZdriverrr	rs

)F)F)__doc__rrer%__all__rrr
rrrr)compiler/r-rrrrrrr	<module>s 


$