Your IP : 3.133.133.251


Current Path : /opt/alt/python311/lib64/python3.11/distutils/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/distutils/__pycache__/text_file.cpython-311.opt-2.pyc

�

c��f�0��2�	ddlZddlZGd�d��ZdS)�Nc�b�eZdZ	dddddddd�Zdd�Zd�Zd�Zdd	�Zdd
�Zdd�Z	d�Z
d
�Zd�ZdS)�TextFile�r�strict)�strip_comments�skip_blanks�	lstrip_ws�	rstrip_ws�
join_lines�
collapse_join�errorsNc��	|�|�td���|j���D]:}||vrt||||���t|||j|���;|���D]}||jvrt	d|z����|�|�|��n||_||_d|_g|_	dS)Nz7you must supply either or both of 'filename' and 'file'zinvalid TextFile option '%s'r)
�RuntimeError�default_options�keys�setattr�KeyError�open�filename�file�current_line�linebuf)�selfrr�options�opts     �:/opt/alt/python311/lib64/python3.11/distutils/text_file.py�__init__zTextFile.__init__Ns��	3������X�Y�Y�Y��'�,�,�.�.�	>�	>�C��g�~�~���c�7�3�<�0�0�0�0���c�4�#7��#<�=�=�=�=��<�<�>�>�	E�	E�C��$�.�.�.��=��C�D�D�D�/��<��I�I�h�����$�D�M��D�I� !�D��
�����c�p�	||_tj|jd|j���|_d|_dS)N�r)r
r)r�iorr
rr)rrs  rrz
TextFile.openos9��	B� ��
��G�D�M�3�t�{�C�C�C��	�����rc�h�	|j}d|_d|_d|_|���dS�N)rrr�close)rrs  rr$zTextFile.closevs5��	/��y����	���
� ����
�
�����rc�t�g}|�|j}|�|jdz��t|tt
f��r&|�dt|��z��n|�d|z��|�t
|����d�|��S)Nz, z
lines %d-%d: z	line %d: �)r�appendr�
isinstance�list�tuple�str�join)r�msg�line�outmsgs    r�	gen_errorzTextFile.gen_errors������<��$�D��
�
�d�m�d�*�+�+�+��d�T�5�M�*�*�	.��M�M�/�E�$�K�K�7�8�8�8�8��M�M�+��,�-�-�-��
�
�c�#�h�h�����w�w�v���rc�N�td|�||��z���)Nzerror: )�
ValueErrorr0�rr-r.s   r�errorzTextFile.error�s#����T�^�^�C��%>�%>�>�?�?�?rc�z�	tj�d|�||��zdz��dS)Nz	warning: �
)�sys�stderr�writer0r3s   r�warnz
TextFile.warn�s=��	�	�
����t�~�~�c�4�'@�'@�@�4�G�H�H�H�H�Hrc��	|jr|jd}|jd=|Sd}	|j���}|dkrd}|jr�|r~|�d��}|dkrnb|dks||dz
dkr7|ddkrdpd}|d|�|z}|���dkr��n|�d	d��}|jr�|r�|�|�d
��|S|j	r|�
��}||z}t|jt��r|jddz|jd<nZ|j|jdzg|_nC|�dSt|jt��r|jddz|_n|jdz|_|jr|jr|���}n7|jr|�
��}n|jr|���}|dks|dkr	|jr���|jr5|ddkr|dd�}��|dd�dkr|dd�dz}��#|S)
N���r&T�#rr�\r6z\#z2continuation line immediately precedes end-of-file���z\
)rr�readliner�find�strip�replacerr:r�lstripr(rr)r	r
�rstripr)rr.�buildup_line�pos�eols     rr@zTextFile.readline�s���	��<�	��<��#�D���R� ��K���a	��9�%�%�'�'�D��r�z�z����"�$
4�t�$
4��i�i��n�n���"�9�9���A�X�X��c�!�e���!4�!4� ��8�t�+�5��;��C���#��;��,�D��z�z�|�|�r�)�)� �*� �<�<��s�3�3�D���
>�<�
>��<��I�I�,�-�-�-�'�'��%�)��;�;�=�=�D�#�d�*���d�/��6�6�@�+/�+<�Q�+?�!�+C�D�%�a�(�(�)-�):�)-�):�Q�)>�)@�D�%�%��<��4��d�/��6�6�>�(,�(9�!�(<�q�(@�D�%�%�(,�(9�A�(=�D�%��~�
%�$�.�
%��z�z�|�|�����
%��{�{�}�}�����
%��{�{�}�}����
�
�d�d�l�l��0@�l����
���8�t�#�#�#'����9�L������9��&�&�#'��"��:��#4�L���Krc�f�	g}	|���}|�|S|�|���.r#)r@r')r�linesr.s   r�	readlineszTextFile.readliness?��	���	��=�=�?�?�D��|����L�L�����		rc�<�	|j�|��dSr#)rr')rr.s  r�
unreadlinezTextFile.unreadlines%��	6�	
����D�!�!�!�!�!r)NNr#)
�__name__�
__module__�__qualname__rrrr$r0r4r:r@rKrM�rrrr
s�������8�t+,�*+�*+�*+�*+�*+�*2�
��O�����B������
�
�
�
�@�@�@�@�I�I�I�I�v�v�v�p���"�"�"�"�"rr)r7r!rrQrr�<module>rRsY��.���������T"�T"�T"�T"�T"�T"�T"�T"�T"�T"r

?>