AlkantarClanX12

Your IP : 3.144.235.141


Current Path : /opt/alt/python34/lib64/python3.4/__pycache__/
Upload File :
Current File : //opt/alt/python34/lib64/python3.4/__pycache__/glob.cpython-34.pyc

�
e f�
�@s�dZddlZddlZddlZddgZdd�Zdd�Zdd�Zd	d
�Zej	d�Z
ej	d�Zd
d�Zdd�Z
dd�ZdS)zFilename globbing utility.�N�glob�iglobcCstt|��S)aReturn 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.

    )�listr)�pathname�r�)/opt/alt/python34/lib64/python3.4/glob.pyr	s	ccstjj|�\}}t|�se|rGtjj|�ra|Vqantjj|�ra|VndS|s�td|�DdHdS||kr�t|�r�t|�}n	|g}t|�r�t}nt}x<|D]4}x+|||�D]}tjj	||�Vq�Wq�WdS)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.

    N)
�os�path�split�	has_magic�lexists�isdir�glob1r�glob0�join)r�dirname�basename�dirsZglob_in_dir�namerrrrs(			
cCs�|s6t|t�r*ttjd�}q6tj}nytj|�}Wntk
ragSYnXt|�s�dd�|D�}ntj||�S)N�ASCIIcSs"g|]}t|�s|�qSr)�	_ishidden)�.0�xrrr�
<listcomp>Hs	zglob1.<locals>.<listcomp>)	�
isinstance�bytesr�curdir�listdir�OSErrorr�fnmatch�filter)r�pattern�namesrrrr=s
	rcCsN|s"tjj|�rJ|gSn(tjjtjj||��rJ|gSgS)N)rr	r
rr)rrrrrrKs
!rz([*?[])s([*?[])cCs:t|t�r!tj|�}ntj|�}|dk	S)N)rr�magic_check_bytes�search�magic_check)�s�matchrrrrZsrcCs|ddkS)Nr�.�.�.)r(r*r)r	rrrrasrcCsVtjj|�\}}t|t�r<tjd|�}ntjd|�}||S)z#Escape all special characters.
    s[\1]z[\1])rr	�
splitdriverrr#�subr%)rZdriverrr�escapeds
r-)�__doc__r�rer�__all__rrrr�compiler%r#rrr-rrrr�<module>s)