Your IP : 3.146.65.134


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/fileinput.cpython-312.opt-2.pyc

�

�Q�fb=����	ddlZddlZddlZddlmZgd�Zdadddddd�d�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
d
�Zd�ZGd�d�Zddd�d�Zdd�Zd�Zedk(re�yy)�N)�GenericAlias)�input�close�nextfile�filename�lineno�
filelineno�fileno�isfirstline�isstdin�	FileInput�hook_compressed�hook_encoded�r��mode�openhook�encoding�errorsc	�v�	trtjrtd��t|||||||��atS)Nzinput() already activer)�_state�_file�RuntimeErrorr
)�files�inplace�backuprrrrs       �0/opt/alt/python312/lib64/python3.12/fileinput.pyrrNs<����&�,�,��3�4�4�
�u�g�v�D�8� (��9�F��M�c�<�	t}da|r|j�yy�N)rr)�states rrr]s ����E�
�F��
���
�
rc�N�	tstd��tj�S�Nzno active input())rrr�rrrres%�����.�/�/��?�?��rc�N�	tstd��tj�Sr#)rrrr$rrrrss%�����.�/�/��?�?��rc�N�	tstd��tj�Sr#)rrrr$rrrr|s$���
��.�/�/��=�=�?�rc�N�	tstd��tj�Sr#)rrr	r$rrr	r	�s'���
��.�/�/�����rc�N�	tstd��tj�Sr#)rrr
r$rrr
r
�s$�����.�/�/��=�=�?�rc�N�	tstd��tj�Sr#)rrrr$rrrr�s'�����.�/�/�����rc�N�	tstd��tj�Sr#)rrrr$rrrr�s%�����.�/�/��>�>��rc��eZdZ	dddddd�d�Zd�Zd�Zd�Zd�Zd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
d�Zd�Zd�Zd�Zd�Zee�Zy)r
Nrrc��t|t�r|f}nVt|tj�rtj|�f}n%|�t
jdd}|sd}nt|�}||_||_	||_
d|_d|_d|_
d|_d|_d|_d|_d|_||_||_t
j*j,r#d|vr|�|�ddl}|j1dt2d�|dvrt5d	��||_|j9d
d�|_|r#|rt5d��t=|�st5d
��||_y)N�)�-rF�bz"'encoding' argument not specified.�)r�rbz*FileInput opening mode must be 'r' or 'rb'r�wz4FileInput cannot use an opening hook in inplace modez#FileInput openhook must be callable) �
isinstance�str�os�PathLike�fspath�sys�argv�tuple�_files�_inplace�_backup�_savestdout�_output�	_filename�_startlineno�_filelinenor�_isstdin�_backupfilename�	_encoding�_errors�flags�warn_default_encoding�warnings�warn�EncodingWarning�
ValueError�_mode�replace�_write_mode�callable�	_openhook)	�selfrrrrrrrrIs	         r�__init__zFileInput.__init__�sJ���e�S�!��H�E�
��r�{�{�
+��Y�Y�u�%�(�E��}������������e��������
���������������������
���
�#���!������
�I�I�+�+��4��H�$4��9I���M�M�>�)�1�
.��{�"��I�J�J���
��<�<��S�1����� �!W�X�X��H�%� �!F�G�G�!��rc�$�|j�yr �r�rRs r�__del__zFileInput.__del__�����
�
�rc�L�	|j�d|_y#d|_wxYw)Nr$)rr;rVs rrzFileInput.close�s��	��M�M�O��D�K��"�D�K�s��	#c��|Sr r$rVs r�	__enter__zFileInput.__enter__�����rc�$�|j�yr rU)rR�type�value�	tracebacks    r�__exit__zFileInput.__exit__�rXrc��|Sr r$rVs r�__iter__zFileInput.__iter__�r\rc��	|j�}|r|xjdz
c_|S|jst�|j	��L�Nr-)�	_readlinerBr�
StopIterationr�rR�lines  r�__next__zFileInput.__next__�sE����>�>�#�D��� � �A�%� ����:�:�#�#��M�M�O�rc�z�|j}d|_|r|t_|j}d|_	|r|j	�|j
}d|_	|`	|r|js|j	�|j}d|_	|r!|jstj|�d|_y#t$rY�hwxYw#t$rY�"wxYw#|j}d|_	|r?|js3tj|�d|_w#t$r
Yd|_wwxYwd|_wxYw#|j
}d|_	|`n#t$rYnwxYw	|r|js|j	�|j}d|_	|r?|js3tj|�d|_w#t$r
Yd|_wwxYwd|_w#|j}d|_	|r?|js3tj|�d|_w#t$r
Yd|_wwxYwd|_wxYwxYw)NF)r>r8�stdoutr?rrrf�AttributeErrorrCrDr=r5�unlink�OSError)rR�
savestdout�output�file�backupfilenames     rrzFileInput.nextfiles���%�%�
�����#�C�J��������	&�������:�:�D��D�J�
��N�

&���
�
��J�J�L�!%�!5�!5��'+��$�!�$�,�,����>�2�!&��
��"�
��
��#�(�D�(��	"&�!5�!5��'+��$�!�$�,�,����>�2�!&��
��#�(�D� %��
�)�� %��
��!�:�:�D��D�J�
��N��!�
��
��

&���
�
��J�J�L�!%�!5�!5��'+��$�!�$�,�,����>�2�!&��
��#�(�D� %��
�)�� %��
��
"&�!5�!5��'+��$�!�$�,�,����>�2�!&��
��#�(�D� %��
�)�� %��
�s��D8�B:�C�C	�:	C�C�		C�C�"D5�:D�D5�	D*� 	D5�)D*�*D5�8H:�
E�H:�	E�H:�E�H:� G�>!H:�F<�4H:�<	G�	H:�G�H:�"H7�<H�H7�	H,�"	H7�+H,�,H7�7H:c��	|j�}|r|xjdz
c_|S|js|S|j��Hre)rfrBrrrhs  r�readlinezFileInput.readline"sD����>�>�#�D��� � �A�%� ����:�:����M�M�O�rc�p�|jsd|jvryy|jd|_|jdd|_|j�|_d|_d|_d|_d|_d|jvr|jxsd}nd}|jdk(rbd	|_d|jvr/ttjd
tj�|_ntj|_d|_�n�|j�r�tj|j�|j xsdz|_	tj"|j�tj&|j|j�t)|j|j||j*�
�|_	tj,|jj/��j0}tj2tj4ztj6z}t9td�r|tj:z}tj(|j||�}tj<||j>||j*�
�|_ 	tjB|j|�tjD|_#|j@t_"n�|jHr{|j�,|jI|j|j�|_nu|jI|j|j|j|j*�
�|_n2t)|j|j||j*�
�|_|jjJ|_&|jM�S#t$$rY��xwxYw#t$$rY��+wxYw#t$$r6t)|j|j>||j*�
�|_ Y��mwxYw)Nr/r�rr-F�localer.z<stdin>�bufferTz.bak�rr�O_BINARY)'r;rMr@rrArBrrCrDrE�getattrr8�stdinr<r5r7r=rnro�rename�openrF�fstatr
�st_mode�O_CREAT�O_WRONLY�O_TRUNC�hasattrr{�fdopenrOr?�chmodrlr>rQrurf)rRr�permr�fds     rrfzFileInput._readline-s���{�{��d�j�j� ������Q�����k�k�!�"�o��� �K�K�M��������
���
� ����d�j�j� ��~�~�1��H��H��>�>�S� �&�D�N��d�j�j� �$�S�Y�Y��#�)�)�D��
� �Y�Y��
� �D�M��}�}��I�I�d�n�n�-����1G��H��$���I�I�d�2�2�3��	�	�$�.�.�$�*>�*>�?�!�$�"6�"6��
�
�+3�D�L�L�J��
���8�8�D�J�J�$5�$5�$7�8�@�@�D�
�:�:����3�b�j�j�@�D��r�:�.�����+���������t�<�B�#%�9�9�R��1A�1A�6>�t�|�|�$U�D�L���������6�$'�:�:�� �!�\�\��
��>�>��~�~�-�%)�^�^�D�N�N�D�J�J�%O��
�%)�^�^� �N�N�D�J�J����X\�Xd�Xd�&4�&f��
�"&�d�n�n�d�j�j�8�\`�\h�\h�!i�D�J����,�,����~�~����M�����*#������P�#'�����8H�8H�19�$�,�,�$P�D�L�P�s6�O�7O6�' O&�	O#�"O#�&	O3�2O3�6;P5�4P5c��|jSr )r@rVs rrzFileInput.filenamevs���~�~�rc�4�|j|jzSr )rArBrVs rrzFileInput.linenoys��� � �4�#3�#3�3�3rc��|jSr �rBrVs rr	zFileInput.filelineno|s�����rc�p�|jr	|jj�Sy#t$rYywxYw)N���)rr
rLrVs rr
zFileInput.filenos:���:�:�
��z�z�(�(�*�*����
��
�s�)�	5�5c� �|jdk(Srer�rVs rrzFileInput.isfirstline�s�����1�$�$rc��|jSr )rCrVs rrzFileInput.isstdin�s���}�}�r�NFrw)�__name__�
__module__�__qualname__rSrWrr[rarcrjrrurfrrr	r
rr�classmethodr�__class_getitem__r$rrr
r
�su��
�-"��D�4��-"�^������&�<�G �R�4� ��%��$�L�1�rr
rzc� �|�d|vrd}tjj|�d}|dk(rddl}|j	||�}n+|dk(rddl}|j
||�}nt	||||��Sd|vrtj|||��}|S)Nr/rxr-z.gzrz.bz2rz)	r5�path�splitext�gzipr�bz2�BZ2File�io�
TextIOWrapper)rrrr�extr��streamr�s        rrr�s�����C�t�O���
�'�'�
�
�8�
$�Q�
'�C�
�e�|�����8�T�*��	�������X�t�,���H�d�X�f�E�E��$���!�!�&�8�F�K���Mrc������fd�}|S)Nc�"��t||����S)Nrz)r)rrrrs  ��rrzhook_encoded.<locals>.openhook�s����H�d�X�f�E�Err$)rrrs`` rrr�s���F��Orc	��ddl}d}d}|jtjddd�\}}|D]\}}|dk(rd}|dk(s�|}�t|||��D]W}|d	dd
k(r|dd	}|d	ddk(r|dd	}t	dt�t
�t�t�xrd
xsd|fz��Yt	dt�t
�t�fz�y)NrFr-zib:z-iTz-b)rrr��
�
z%d: %s[%d]%s %s�*rwz
%d: %s[%d])	�getoptr8r9r�printrrr	r)r�rr�opts�args�o�aris        r�_testr��s�����G�
�F����s�x�x���|�U�3�J�D�$����1���9��g���9�q�f���d�G�F�;�����9���T�#�2�Y�d����9���T�#�2�Y�d�
��6�8�X�Z���#.�=�#8�S�#>�B��#F�F�	G�<�

�,�&�(�H�J�
��=�
=�>r�__main__r�r )r�r8r5�typesr�__all__rrrrrrr	r
rrr
rrr�r�r$rr�<module>r�s���A�F
�����
��
��d���
������� ��c2�c2�L15�T��&�
?��z��	�G�r

?>