ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/textwrap.cpython-311.opt-2.pyc

�

�fM����	ddlZgd�ZdZGd�d��Zdd�Zdd�Zd	�Zejd
ej��Z	ejdej��Z
d�Zdd
�Ze
dkreed����dSdS)�N)�TextWrapper�wrap�fill�dedent�indent�shortenz	

 c��eZdZ	e�eee��ed����ZdZ	dZ
deje��zZ
de
dd�zZejde	e
e
ed	�zej��Z[	[
[ejd
e
z��Z[
ejd��Z										dddd�d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�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)
            )
        ))�wp�lt�ws�nwsz(%s+)z[a-z][\.\!\?][\"\']?\Z�F�TF�z [...])�	max_lines�placeholderc��||_||_||_||_||_||_||_||_|	|_|
|_	||_
||_dS�N)�width�initial_indent�subsequent_indent�expand_tabs�replace_whitespace�fix_sentence_endings�break_long_words�drop_whitespace�break_on_hyphens�tabsizerr)
�selfrrrrrrrrrr rrs
             �//opt/alt/python311/lib64/python3.11/textwrap.py�__init__zTextWrapper.__init__psg����
�,���!2���&���"4���$8��!� 0���.��� 0������"���&�����c��	|jr|�|j��}|jr|�|j��}|Sr)r�
expandtabsr r�	translate�unicode_whitespace_trans�r!�texts  r"�_munge_whitespacezTextWrapper._munge_whitespace�sL��	���	1��?�?�4�<�0�0�D��"�	A��>�>�$�"?�@�@�D��r$c��	|jdur|j�|��}n|j�|��}d�|D��}|S)NTc��g|]}|�|��S�r.��.0�cs  r"�
<listcomp>z&TextWrapper._split.<locals>.<listcomp>�s��)�)�)��q�)�!�)�)�)r$)r�
wordsep_re�split�wordsep_simple_re�r!r*�chunkss   r"�_splitzTextWrapper._split�s\��
	�� �D�(�(��_�*�*�4�0�0�F�F��+�1�1�$�7�7�F�)�)�V�)�)�)���
r$c���	d}|jj}|t|��dz
krK||dzdkr|||��rd||dz<|dz
}n|dz
}|t|��dz
k�IdSdS)Nrrr
z  �)�sentence_end_re�search�len)r!r7�i�	patsearchs    r"�_fix_sentence_endingsz!TextWrapper._fix_sentence_endings�s���	�
���(�/�	��#�f�+�+�a�-����a��c�{�c�!�!�i�i��q�	�&:�&:�!�"��q��s���Q�����Q����#�f�+�+�a�-������r$c��	|dkrd}n||z
}|jr�|}|d}|jrVt|��|krC|�dd|��}|dkr&t	d�|d|�D����r|dz}|�|d|���||d�|d<dS|s)|�|�����dSdS)Nr����-rc3�"K�|]
}|dkV��dS)rCNr.r/s  r"�	<genexpr>z0TextWrapper._handle_long_word.<locals>.<genexpr>�s&����%G�%G�1�a�3�h�%G�%G�%G�%G�%G�%Gr$)rrr=�rfind�any�append�pop)	r!�reversed_chunks�cur_line�cur_lenr�
space_left�end�chunk�hyphens	         r"�_handle_long_wordzTextWrapper._handle_long_word�s��	��1�9�9��J�J����J�� �	3��C�#�B�'�E��$�
%��U���j�)@�)@����S�!�Z�8�8���A�:�:�#�%G�%G��g�v�g��%G�%G�%G�"G�"G�:� �1�*�C��O�O�E�$�3�$�K�(�(�(�"'����+�O�B����
�	3��O�O�O�/�/�1�1�2�2�2�2�2�	3�	3r$c�:�	g}|jdkrtd|jz���|j�h|jdkr|j}n|j}t|��t|j�����z|jkrtd���|���|�r�g}d}|r|j}n|j}|jt|��z
}|j	r#|d�
��dkr|r|d=|rNt|d��}||z|kr-|�|�����||z
}nn|�N|rSt|d��|kr:|�
||||��ttt
|����}|j	r;|r9|d�
��dkr|t|d��z}|d=|�r�|j�Wt|��dz|jks<|r4|j	r`t|��dkrM|d�
��s3||kr-|�|d�|��z���n!|r�|d�
��ra|t|j��z|krF|�|j��|�|d�|��z��n�|t|d��z}|d=|��|rU|d���}t|��t|j��z|jkr||jz|d<n3|�||j���z��n|���|S)Nrzinvalid width %r (must be > 0)rz#placeholder too large for max widthrBr)r�
ValueErrorrrrr=r�lstrip�reverser�striprHrIrQ�sum�map�join�rstrip)	r!r7�linesrrKrLr�l�	prev_lines	         r"�_wrap_chunkszTextWrapper._wrap_chunks�s���	����:��?�?��=��
�J�K�K�K��>�%��~��!�!��/����,���6�{�{�S��!1�!8�!8�!:�!:�;�;�;�d�j�H�H� �!F�G�G�G�	�������G	��H��G��
-��/����,���J��V���,�E��#�
��r�
�(8�(8�(:�(:�b�(@�(@�U�(@��2�J��

���r�
�O�O���Q�;�%�'�'��O�O�F�J�J�L�L�1�1�1��q�L�G�G���

��
2�#�f�R�j�/�/�E�1�1��&�&�v�x��%�H�H�H��c�#�x�0�0�1�1���#�
!��
!�X�b�\�5G�5G�5I�5I�R�5O�5O��3�x��|�,�,�,���R�L��
��N�*���J�J��N�T�^�3�3��4��)�4���[�[�A�%�%������*�*�&�07�5�0@�0@��L�L��"�'�'�(�*;�*;�!;�<�<�<�<�"�I�$�R�L�.�.�0�0�"�#�c�$�*:�&;�&;�;�u�D�D�$�O�O�D�,<�=�=�=�!�L�L��"�'�'�(�2C�2C�)C�D�D�D�!��3�x��|�#4�#4�4��$�R�L�#�I�!�&�(-�b�	�(8�(8�(:�(:�I� #�I����T�5E�1F�1F� F�$(�J�!/�!/�,5��8H�,H��b�	� %����V�d�.>�.E�.E�.G�.G�%G�H�H�H��O�G	�R�r$c�V�|�|��}|�|��Sr)r+r8r)s  r"�
_split_chunkszTextWrapper._split_chunksUs'���%�%�d�+�+���{�{�4� � � r$c��	|�|��}|jr|�|��|�|��Sr)r`rr@r^r6s   r"rzTextWrapper.wrap[sO��	��#�#�D�)�)���$�	/��&�&�v�.�.�.�� � ��(�(�(r$c�T�	d�|�|����S)N�
)rYrr)s  r"rzTextWrapper.fillis%��	��y�y����4���)�)�)r$)
rrrTTFTTTr)�__name__�
__module__�__qualname__�dict�fromkeysrX�ord�_whitespacer(�
word_punct�letter�re�escape�
whitespace�nowhitespace�compile�VERBOSEr3r5r;r#r+r8r@rQr^r`rrr.r$r"rrs�������.�` $�}�}�S�S��k�-B�-B�C�C��H�H�M�M��!�J�
�F��9�2�9�[�1�1�1�J��*�Q�R�R�.�(�L����
�!�� ��7�7�7�"	�
�#��J�$	�F�L�#��
�8�j�#8�9�9���!�b�j�"'�(�(�O�� "�#%�!�$(�&+�"&�!%�"&��'� �%�'�'�'�'�'�>������,���$!3�!3�!3�Re�e�e�N!�!�!�)�)�)�*�*�*�*�*r$rrc�J�	tdd|i|��}|�|��S�Nrr.)rr�r*r�kwargs�ws    r"rrus1���	�*�*�%�*�6�*�*�A��6�6�$�<�<�r$c�J�	tdd|i|��}|�|��Srt)rrrus    r"rr�s1���	�*�*�%�*�6�*�*�A��6�6�$�<�<�r$c��	td|dd�|��}|�d�|����������S)Nr)rrr
r.)rrrYrVr4rus    r"rr�sU��
�	�7�%�1�7�7��7�7�A��6�6�#�(�(�4�:�:�<�<�-�-�/�/�0�0�1�1�1r$z^[ 	]+$z(^[ 	]*)(?:[^ 	
])c��	d}t�d|��}t�|��}|D]m}|�|}�|�|��r�|�|��r|}�5tt
||����D]\}\}}||kr|d|�}n��n	|rtjd|zd|��}|S)Nrrrcz(?m)^)	�_whitespace_only_re�sub�_leading_whitespace_re�findall�
startswith�	enumerate�zipr4rm)r*�margin�indentsrr>�x�y�lines        r"rr�s����F��"�"�2�t�,�,�D�$�,�,�T�2�2�G������>��F�F��
�
�v�
&�
&�	���
�
�v�
&�
&�		��F�F�
'�s�6�6�':�':�;�;�
�
�	��6�A�q���6�6�#�B�Q�B�Z�F��E���
=�
�3��v�h��'��T�2�2���Kr$c�\����	��d�����fd�}d�|����S)Nc�*�|���Sr)rV)r�s r"�	predicatezindent.<locals>.predicate�s���:�:�<�<�r$c3�d�K���d��D]}�|��r�|zn|V��dS)NT)�
splitlines)r�r��prefixr*s ���r"�prefixed_lineszindent.<locals>.prefixed_lines�sP������O�O�D�)�)�	?�	?�D�$-�I�d�O�O�=�6�D�=�=��>�>�>�>�	?�	?r$r)rY)r*r�r�r�s``` r"rr�s`��������	 �	 �	 �?�?�?�?�?�?�?��7�7�>�>�#�#�$�$�$r$�__main__z Hello there.
  This is indented.)rr)rm�__all__rjrrrrrq�	MULTILINEr{r}rrrd�printr.r$r"�<module>r�s���
�	�	�	�
H�
H�
H��
 ��_*�_*�_*�_*�_*�_*�_*�_*�H����
�
�
�
�
2�
2�
2�$!�b�j��R�\�:�:��#���$;�R�\�J�J��0�0�0�f%�%�%�%�$�z���
�E�&�&�4�
5�
5�6�6�6�6�6��r$

Zerion Mini Shell 1.0