Hacked By AnonymousFox

Current Path : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/textwrap.cpython-36.opt-2.pyc

3

��2afL�@s�ddlZddddddgZdZGd	d�d�Zddd�Zddd�Zd
d�Zejdej�Z	ejdej�Z
dd�Zddd�Ze
dkr�eed��dS)�N�TextWrapper�wrap�fill�dedent�indent�shortenz	

 c
@s�eZdZiZed�ZxeD]Zeeee�<qWdZdZ	de
je�Zdedd�Z
e
jdee	ee
d	�e
j�Z[[	[
e
jd
e�Z[e
jd�Zd%ddd�dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�ZdS)&r� z[\w!"\'&.,?]z[^\d\W]z[%s]z[^�Na�
        ( # any whitespace
          %(ws)s+
        | # em-dash between words
          (?<=%(wp)s) -{2,} (?=\w)
        | # word, possibly hyphenated
          %(nws)s+? (?:
            # hyphenated word
              -(?: (?<=%(lt)s{2}-) | (?<=%(lt)s-%(lt)s-))
              (?= %(lt)s -? %(lt)s)
            | # end of word
              (?=%(ws)s|\Z)
            | # em-dash
              (?<=%(wp)s) (?=-{2,}\w)
            )
        ))Zwp�ltZwsZnwsz(%s+)z[a-z][\.\!\?][\"\']?\Z�F�TF�z [...])�	max_lines�placeholderc
CsL||_||_||_||_||_||_||_||_|	|_|
|_	||_
||_dS)N)�width�initial_indent�subsequent_indent�expand_tabs�replace_whitespace�fix_sentence_endings�break_long_words�drop_whitespace�break_on_hyphens�tabsizerr)
�selfrrrrrrrrrrrr�r�-/opt/alt/python36/lib64/python3.6/textwrap.py�__init__sszTextWrapper.__init__cCs(|jr|j|j�}|jr$|j|j�}|S)N)r�
expandtabsrr�	translate�unicode_whitespace_trans)r�textrrr�_munge_whitespace�s
zTextWrapper._munge_whitespacecCs6|jdkr|jj|�}n|jj|�}dd�|D�}|S)NTcSsg|]}|r|�qSrr)�.0�crrr�
<listcomp>�sz&TextWrapper._split.<locals>.<listcomp>)r�
wordsep_re�split�wordsep_simple_re)rr!�chunksrrr�_split�s

zTextWrapper._splitcCs`d}|jj}xN|t|�dkrZ||ddkrP|||�rPd||d<|d7}q|d7}qWdS)Nrr	rz  �)�sentence_end_re�search�len)rr)�i�	patsearchrrr�_fix_sentence_endings�s	
z!TextWrapper._fix_sentence_endingscCs^|dkrd}n||}|jrH|j|dd|��|d|d�|d<n|sZ|j|j��dS)Nr	���r2r2)r�append�pop)r�reversed_chunks�cur_line�cur_lenr�
space_leftrrr�_handle_long_word�s
zTextWrapper._handle_long_wordc	Cs�g}|jdkrtd|j��|jdk	rb|jdkr8|j}n|j}t|�t|jj��|jkrbtd��|j��x&|�r�g}d}|r�|j}n|j}|jt|�}|j	r�|dj
�dkr�|r�|d=x:|r�t|d�}|||kr�|j|j��||7}q�Pq�W|�r.t|d	�|k�r.|j
||||�ttt|��}|j	�rd|�rd|d
j
�dk�rd|t|d�8}|d=|rn|jdk�s�t|�d|jk�s�|�s�|j	�r�t|�dk�r�|dj
��r�||k�r�|j|dj|��qnx�|�r<|d
j
��r"|t|j�|k�r"|j|j�|j|dj|��P|t|d�8}|d=�q�W|�rz|dj�}t|�t|j�|jk�rz||j|d<P|j||jj��PqnW|S)Nrzinvalid width %r (must be > 0)r	z#placeholder too large for max widthrr2r2r2r2r2r2r2r2r2r2r2r2)r�
ValueErrorrrrr.r�lstrip�reverser�stripr3r4r9�sum�map�join�rstrip)	rr)�linesrr6r7r�l�	prev_linerrr�_wrap_chunks�sp





 
zTextWrapper._wrap_chunkscCs|j|�}|j|�S)N)r"r*)rr!rrr�
_split_chunksPs
zTextWrapper._split_chunkscCs$|j|�}|jr|j|�|j|�S)N)rFrr1rE)rr!r)rrrrVs	

zTextWrapper.wrapcCsdj|j|��S)N�
)r@r)rr!rrrrdszTextWrapper.fill)
rrrTTFTTTr
)�__name__�
__module__�__qualname__r �ord�uspace�_whitespace�xZ
word_punctZletter�re�escapeZ
whitespaceZnowhitespace�compile�VERBOSEr&r(r,rr"r*r1r9rErFrrrrrrrsH1


!grcKstfd|i|��}|j|�S)Nr)rr)r!r�kwargs�wrrrrps
cKstfd|i|��}|j|�S)Nr)rr)r!rrSrTrrrr}s	cKs,tf|dd�|��}|jdj|j�j���S)Nr	)rrr)rrr@r=r')r!rrSrTrrrr�sz^[ 	]+$z(^[ 	]*)(?:[^ 	
])cCs�d}tjd|�}tj|�}x||D]t}|dkr2|}q |j|�r>q |j|�rN|}q xDtt||��D]"\}\}}||kr^|d|�}Pq^W|dt|��}q Wdr�|r�x|jd�D]}q�W|r�t	jd|d|�}|S)NrrrGz(?m)^)
�_whitespace_only_re�sub�_leading_whitespace_re�findall�
startswith�	enumerate�zipr.r'rO)r!�margin�indentsrr/rN�y�linerrrr�s*



cs,�dkrdd�����fdd�}dj|��S)NcSs|j�S)N)r=)r_rrr�	predicate�szindent.<locals>.predicatec3s.x(�jd�D]}�|�r �|n|VqWdS)NT)�
splitlines)r_)r`�prefixr!rr�prefixed_lines�szindent.<locals>.prefixed_linesr)r@)r!rbr`rcr)r`rbr!rr�s�__main__z Hello there.
  This is indented.)r)r)N)rO�__all__rMrrrrrQ�	MULTILINErUrWrrrH�printrrrr�<module>sa

5


Hacked By AnonymousFox1.0, Coded By AnonymousFox