zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
U
G=®dÜã@s’dZddlZddlZddlZdddgZddd„Zddd„Zd    d
„Zd d „Zd d„Z    dd„Z
dd„Z e  d¡Z e  d¡Zdd„Zdd„Zdd„ZdS)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.
éNÚglobÚiglobÚescapeFcCstt||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)Úpathnamer©rúFD:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\setuptools/glob.pyrs cCs*t||ƒ}|r&t|ƒr&t|ƒ}|r&t‚|S)aŒReturn 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Ú _isrecursiveÚnextÚAssertionError)rrÚitÚsrrr    rs
 
 ccsütj |¡\}}t|ƒsF|r0tj |¡rB|Vntj |¡rB|VdS|sˆ|rnt|ƒrnt||ƒD]
}|Vq`nt||ƒD]
}|VqxdS||kr¤t|ƒr¤t    ||ƒ}n|g}t|ƒrÊ|rÄt|ƒrÄt}qÎt}nt
}|D]$}|||ƒD]}tj  ||¡VqàqÒdS©N) ÚosÚpathÚsplitÚ    has_magicÚlexistsÚisdirr Úglob2Úglob1r
Úglob0Újoin)rrÚdirnameÚbasenameÚxÚdirsÚ glob_in_dirÚnamerrr    r
0s4   
  r
cCsV|s"t|tƒrtj d¡}ntj}zt |¡}Wntk
rHgYSXt ||¡S©NÚASCII)    Ú
isinstanceÚbytesrÚcurdirÚencodeÚlistdirÚOSErrorÚfnmatchÚfilter)rÚpatternÚnamesrrr    r[s
 
rcCs8|stj |¡r4|gSntj tj ||¡¡r4|gSgSr)rrrrr)rrrrr    rhs  rccs2t|ƒs t‚|dd…Vt|ƒD]
}|Vq"dS)Nr)r r Ú    _rlistdir)rr+rrrr    rxs  rccs’|s"t|tƒrtj d¡}ntj}zt |¡}Wntjk
rHYdSX|D]>}|V|rjtj ||¡n|}t    |ƒD]}tj ||¡VqvqNdSr!)
r#r$rr%r&r'Úerrorrrr-)rr,rrÚyrrr    r-€s
 r-z([*?[])s([*?[])cCs(t|tƒrt |¡}n
t |¡}|dk    Sr)r#r$Úmagic_check_bytesÚsearchÚ magic_check)rÚmatchrrr    r•s
 
rcCst|tƒr|dkS|dkSdS)Ns**z**)r#r$)r+rrr    r s
r cCs<tj |¡\}}t|tƒr(t d|¡}n t d|¡}||S)z#Escape all special characters.
    s[\1]z[\1])rrÚ
splitdriver#r$r0Úsubr2)rÚdriverrr    r¤s
 
 )F)F)Ú__doc__rÚrer)Ú__all__rrr
rrrr-Úcompiler2r0rr rrrrr    Ú<module>s 
 
 
+