AlkantarClanX12

Your IP : 3.16.76.102


Current Path : /opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/__pycache__/glob.cpython-35.opt-1.pyc



��Yf��@s�dZddlZddlZddlZdddgZdddd�Zddd	d�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zejd�Z
ejd�Zdd�Zdd�Zdd�Zdd�ZdS)zFilename globbing utility.�N�glob�iglob�escape�	recursiveFcCstt|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.
    r)�listr)�pathnamer�r�)/opt/alt/python35/lib64/python3.5/glob.pyr	scCs1t||�}|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)rr�it�srrr	rsccsNtjj|�\}}t|�s_|rDtjj|�r[|Vntjj|�r[|VdS|s�|r�t|�r�t||�EdHnt||�EdHdS||kr�t|�r�t	||�}n	|g}t|�r|r�t|�r�t}qt}nt
}x<|D]4}x+|||�D]}tjj||�Vq(WqWdS)N)�os�path�split�	has_magic�lexists�isdirr�glob2�glob1r
�glob0�join)rr�dirname�basename�dirsZglob_in_dir�namerrr	r
's0			
r
cCs�|s3t|t�r*ttjd�}n	tj}ytj|�}Wntk
r^gSYnXt|�s~dd�|D�}tj||�S)N�ASCIIcSs"g|]}t|�s|�qSr)�	_ishidden)�.0�xrrr	�
<listcomp>Ys	zglob1.<locals>.<listcomp>)	�
isinstance�bytesr�curdir�listdir�OSErrorr�fnmatch�filter)r�pattern�namesrrr	rNs	
	rcCsN|s"tjj|�rJ|gSn(tjjtjj||��rJ|gSgS)N)rrrrr)rrrrr	r\s
!rccs"|dd�Vt|�EdHdS)Nr)�	_rlistdir)rr)rrr	rjsrc
cs�|s3t|t�r*ttjd�}n	tj}ytj|�}Wntjk
radSYnXxk|D]c}t|�si|V|r�tjj||�n|}x(t	|�D]}tjj||�Vq�WqiWdS)Nr)
r"r#rr$r%�errorrrrr+)rr*r r�yrrr	r+ps		
!r+z([*?[])s([*?[])cCs:t|t�r!tj|�}ntj|�}|dk	S)N)r"r#�magic_check_bytes�search�magic_check)r�matchrrr	r�srcCs|ddkS)Nr�.�.�.)r2r4r)rrrr	r�srcCs't|t�r|dkS|dkSdS)Ns**z**)r"r#)r)rrr	r�s
rcCsVtjj|�\}}t|t�r<tjd|�}ntjd|�}||S)z#Escape all special characters.
    s[\1]z[\1])rr�
splitdriver"r#r.�subr0)rZdriverrr	r�s
)�__doc__r�rer'�__all__rrr
rrrr+�compiler0r.rrrrrrrr	�<module>s"
'