%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/utils/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/utils/itertools.pyc

�
���^c@@sedZddlmZmZddlZddlZddlZdd�Z	dd�Z
d�ZdS(u$
Helpful generators and other tools
i(tabsolute_importtunicode_literalsNcc@s�tj|dkrdntj|��}d}t|�}x�tr�|j||�}|s�||ksu|dk	r�||}|r�|Vq�nPn||j�ks�|dk	r�|||j�!Vn|j�}q?WdS(u�
    Generator function for iterating through large strings, particularly useful
    as a replacement for str.splitlines().

    See http://stackoverflow.com/a/3865367
    u\s+iN(	tretcompiletNonetescapetlentTruetsearchtstarttend(torigtseptexptpostlengthtmatchtval((s8/usr/lib/python2.7/site-packages/salt/utils/itertools.pytsplits*	
icc@s�y|t|�krt�nWntk
r>td��nXznxgtr�y|j|�}Wn8tk
r�tjjj|d�}|j|�}nX|s�Pn|VqEWWdy|j	�Wntk
r�nXXdS(uc
    Generator that reads chunk_size bytes at a time from a file/filehandle and
    yields it.
    uchunk_size must be an integerurbN(
tintt
ValueErrorRtreadtAttributeErrortsalttutilstfilestfopentclose(tfh_t
chunk_sizetchunk((s8/usr/lib/python2.7/site-packages/salt/utils/itertools.pyt	read_file)s&

	


cC@shyt|�}Wntk
r$dSXx<|D]4}ytj||�rK|SWq,tk
r_q,Xq,WdS(u�
    Convenience function which runs fnmatch.fnmatch() on each element of passed
    iterable. The first matching candidate is returned, or None if there is no
    matching candidate.
    N(titert	TypeErrorRtfnmatch(t
candidatestpatterntcandidates_itert	candidate((s8/usr/lib/python2.7/site-packages/salt/utils/itertools.pytfnmatch_multipleEs


(t__doc__t
__future__RRR"Rtsalt.utils.filesRRRRR'(((s8/usr/lib/python2.7/site-packages/salt/utils/itertools.pyt<module>s

Zerion Mini Shell 1.0