• File: glob.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/glob.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 4.16 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Sj@sdZddlZddlZddlZdddgZddddZddd	dZd
dZdd
ZddZ	ddZ
ddZddZddZ
ddZedZedZddZddZd d!Zd"dZdS)#zFilename globbing utility.NglobiglobescapeF)	recursivecCstt||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.
    )r)listr)pathnamerr)/opt/alt/python37/lib64/python3.7/glob.pyr	scCs,t||d}|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.
    F)_iglob_isrecursivenextAssertionError)rritsrrr	rs
ccstj|\}}t|sN|r t|r8tj|rJ|Vntj|rJ|VdS|s|rrt|rrt|||EdHnt	|||EdHdS||krt|rt
||d}n|g}t|r|rt|rt}qt	}nt}x2|D]*}x$||||D]}tj||VqWqWdS)NT)
ospathsplit	has_magicr
lexistsisdirr_glob2_glob1r
_glob0join)rrdironlydirnamebasenamedirsZglob_in_dirnamerrr	r
's2
r
cCs0tt||}t|s$dd|D}t||S)Ncss|]}t|s|VqdS)N)	_ishidden).0xrrr		<genexpr>Rsz_glob1.<locals>.<genexpr>)r_iterdirrfnmatchfilter)rpatternrnamesrrr	rOsrcCs8|stj|r4|gSntjtj||r4|gSgS)N)rrrrr)rrrrrr	rUsrcCst||dS)NF)r)rr&rrr	glob0bsr(cCst||dS)NF)r)rr&rrr	glob1esr)ccs.t|st|ddVt||EdHdS)Nr)rr
	_rlistdir)rr&rrrr	rksrc
cs|s"t|trttjd}ntj}yVt|B}x:|D]2}y|rH|rP|jVWq6tk
rfYq6Xq6WWdQRXWntk
rdSXdS)NASCII)
isinstancebytesrcurdirscandiris_dirrOSError)rrrentryrrr	r#rs

r#ccshtt||}xT|D]L}t|s|V|r8tj||n|}x"t||D]}tj||VqHWqWdS)N)rr#rrrrr*)rrr'r!ryrrr	r*s
r*z([*?[])s([*?[])cCs(t|trt|}n
t|}|dk	S)N)r,r-magic_check_bytessearchmagic_check)rmatchrrr	rs

rcCs|ddkS)Nr)..r)rrrr	rsrcCst|tr|dkS|dkSdS)Ns**z**)r,r-)r&rrr	rs
rcCs<tj|\}}t|tr(td|}ntd|}||S)z#Escape all special characters.
    s[\1]z[\1])rr
splitdriver,r-r4subr6)rZdriverrr	rs

)__doc__rrer$__all__rrr
rrr(r)rr#r*compiler6r4rrrrrrrr	<module>s(

(