Hacked By AnonymousFox
�
c��f�0 � �2 � d dl Z d dlZ G d� d� � ZdS )� Nc �b � e Zd Z dddddddd�Zdd�Zd� Zd� Zdd �Zdd
�Zdd�Z d� Z
d
� Zd� ZdS )�TextFile� r �strict)�strip_comments�skip_blanks� lstrip_ws� rstrip_ws�
join_lines�
collapse_join�errorsNc � � |�|�t d� � �| j � � � D ]:}||v rt | ||| � � �t | || j | � � �;|� � � D ]}|| j vrt d|z � � ��|�| � |� � n|| _ || _ d| _ g | _ d S )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)�selfr r �options�opts �:/opt/alt/python311/lib64/python3.11/distutils/text_file.py�__init__zTextFile.__init__N s � � 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 � || _ t j | j d| j �� � | _ d| _ d S )N�r)r
r )r �ior r
r r )r r s r r z
TextFile.openo s9 � � B� ��
��G�D�M�3�t�{�C�C�C�� �����r c �h � | j }d | _ d | _ d | _ |� � � d S �N)r r r �close)r r s r r$ zTextFile.closev s5 � � /��y���� ���
� ����
�
�����r c �t � g }|�| j }|� | j dz � � t |t t
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_error s� � ����<��$�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���r c �N � t d| � ||� � z � � �)Nzerror: )�
ValueErrorr0 �r r- r. s r �errorzTextFile.error� s# � ���T�^�^�C��%>�%>�>�?�?�?r c �z � t j � d| � ||� � z dz � � d S )Nz warning: �
)�sys�stderr�writer0 r3 s r �warnz
TextFile.warn� s= � � � �
����t�~�~�c�4�'@�'@�@�4�G�H�H�H�H�Hr c � � | j r| j d }| j d= |S d} | j � � � }|dk rd }| j r�|r~|� d� � }|dk rnb|dk s||dz
dk r7|d dk rdpd}|d|� |z }|� � � dk r��n|� d d� � }| j r�|r�|�| � d
� � |S | j r|�
� � }||z }t | j t � � r| j d dz | j d<