����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
python310
/
lib64
/
python3.10
/
__pycache__
/
Filename :
fileinput.cpython-310.opt-2.pyc
back
Copy
o �����=?h:@����������������������@���s���� �d�dl�Z�d�dlZd�dlZd�dlmZ�g�d�Zdad$ddddd�dd �Zd d��Zdd ��Z dd��Z dd��Zdd��Zdd��Z dd��Zdd��ZG�dd��d�Zddd�dd�Zd%dd �Zd!d"��Zed#kree���dS�dS�)&�����N)�GenericAlias)�input�close�nextfile�filename�lineno� filelineno�fileno�isfirstline�isstdin� FileInput�hook_compressed�hook_encodedF���r��mode�openhook�encoding�errorsc������������� ���C���s.��� �t�r t�jr td��t|�||||||d�a�t�S�)Nzinput() already activer���)�_state�_file�RuntimeErrorr���)�files�inplace�backupr���r���r���r�����r����0/opt/alt/python310/lib64/python3.10/fileinput.pyr���N���s��� �r���c������������������C���s��� �t�}�d�a�|�r |�����d�S�d�S��N)r���r���)�stater���r���r���r���]���s����r���c�������������������C������� �t�std��t����S��Nzno active input())r���r���r���r���r���r���r���r���e���s��� r���c�������������������C���r ���r!���)r���r���r���r���r���r���r���r���s�������r���c�������������������C���r ���r!���)r���r���r���r���r���r���r���r���|�������r���c�������������������C���r ���r!���)r���r���r���r���r���r���r���r�������r#���r���c�������������������C���r ���r!���)r���r���r ���r���r���r���r���r �������r"���r ���c�������������������C���r ���r!���)r���r���r ���r���r���r���r���r �������r"���r ���c�������������������C���r ���r!���)r���r���r���r���r���r���r���r�������r"���r���c�������������������@���s����e�Zd�Z �d(ddddd�dd�Zdd ��Zd d��Zdd ��Zdd��Zdd��Zdd��Z dd��Z dd��Zdd��Zdd��Z dd��Zdd��Zd d!��Zd"d#��Zd$d%��Zd&d'��Zee�ZdS�))r���NFr���r���r���c���������� ������C���sP��t�|t�r |f}n!t�|tj�rt�|�f}n|d�u�r!tjdd���}|s&d}nt|�}||�_||�_ ||�_ d�|�_d�|�_d�|�_ d|�_d|�_d�|�_d|�_d�|�_||�_||�_tjjrld|vrl|d�u�rl|d�u�rldd�l}|�dtd��|dvrttd ��d |v�r�dd�l}|�dtd��||�_d |vr�|�dd �nd |�_|r�|r�td��t|�s�td��||�_ d�S�)N����)�-r���F�bz"'encoding' argument not specified.����)r���ZrU�U�rbz=FileInput opening mode must be one of 'r', 'rU', 'U' and 'rb'r(���z'U' mode is deprecatedr����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�DeprecationWarning�_mode�replace�_write_mode�callable� _openhook) �selfr���r���r���r���r���r���r���rA���r���r���r����__init__����sV��� �� zFileInput.__init__c�����������������C�������|������d�S�r����r����rK���r���r���r����__del__��������zFileInput.__del__c�����������������C���s���z |������W�d|�_d�S�d|�_w�)Nr���)r���r3���rO���r���r���r���r�������s��� zFileInput.closec�����������������C�������|�S�r���r���rO���r���r���r���� __enter__��������zFileInput.__enter__c�����������������C���rM���r���rN���)rK����type�value� tracebackr���r���r����__exit__����rQ���zFileInput.__exit__c�����������������C���rR���r���r���rO���r���r���r����__iter__����rT���zFileInput.__iter__c�����������������C���s4��� �|�����}|r|��jd7��_|S�|�jst�|�����q�NTr$���)� _readliner:���r���� StopIterationr����rK����liner���r���r����__next__���������zFileInput.__next__c�����������������C���sN���dd�l�}|jdtdd��||����krtd��z|����W�S��ty&���td��w�)Nr���zTSupport for indexing FileInput objects is deprecated. Use iterator protocol instead.r'���)� stacklevelzaccessing lines out of orderzend of input reached)rA���rB���rE���r���r���r_���r\���� IndexError)rK����irA���r���r���r����__getitem__ ��s���� �zFileInput.__getitem__c�����������������C���s���|�j�}d�|�_�|r|t_|�j}d�|�_zm|r|����W�|�j}d�|�_z|�`W�n �ty,���Y�nw�z+|r7|�js7|����W�|�j }d�|�_ |rT|�j sTzt�|��W�n �t yS���Y�nw�d|�_d�S�|�j }d�|�_ |r{|�j s{z t�|��W�d|�_w��t yz���Y�d|�_w�w�d|�_w�|�j}d�|�_z|�`W�n �ty����Y�nw�z0|r�|�js�|����W�|�j }d�|�_ |r�|�j s�z t�|��W�d|�_w��t y����Y�d|�_w�w�d|�_w�|�j }d�|�_ |r�|�j s�z t�|��W�d|�_w��t y����Y�d|�_w�w�d|�_w�)NF)r6���r0����stdoutr7���r���r���r[����AttributeErrorr;���r<���r5���r-����unlink�OSError)rK���Z savestdout�output�fileZbackupfilenamer���r���r���r�����s������ � � ���� � ��� ��zFileInput.nextfilec�����������������C���s4��� �|�����}|r|��jd7��_|S�|�js|S�|�����qrZ���)r[���r:���r���r���r]���r���r���r����readline6��r`���zFileInput.readlinec�������������� ���C���sP��|�j�sd|�jv�r dS�dS�|�j�d�|�_|�j�dd���|�_�|����|�_d|�_d�|�_d|�_d|�_d|�jvr6|�j p4d}nd�}|�jdkrWd |�_d|�jv�rOt tjd tj�|�_ntj|�_d|�_n�|�j r�t�|�j�|�jpcd�|�_zt�|�j��W�n �tyw���Y�nw�t�|�j|�j��t|�j|�j||�jd �|�_zt�|�j����j}W�n�ty����t|�j|�j||�jd �|�_Y�n;w�tjtjB�tjB�}ttd�r�|tjO�}t�|�j||�}tj ||�j||�jd �|�_z t�!|�j|��W�n �ty����Y�nw�tj"|�_#|�jt_"n/|�j$�r|�j d�u��r|��$|�j|�j�|�_n|�j$|�j|�j|�j |�jd �|�_nt|�j|�j||�jd �|�_|�jj%|�_&|��&��S�)Nr&��������r���r���r$���F�localer%���z<stdin>�bufferTz.bak�r���r����O_BINARY)'r3���rF���r8���r���r9���r:���r���r;���r<���r=����getattrr0����stdinr4���r-���r/���r5���rg���rh����rename�openr>����fstatr ����st_moderH���r7����O_CREAT�O_WRONLY�O_TRUNC�hasattrrp����fdopen�chmodre���r6���rJ���rk���r[���)rK���r���Zpermr����fdr���r���r���r[���A��s|��� �� � �� �� � zFileInput._readlinec�����������������C�������|�j�S�r���)r8���rO���r���r���r���r����������zFileInput.filenamec�����������������C���s���|�j�|�j�S�r���)r9���r:���rO���r���r���r���r������rQ���zFileInput.linenoc�����������������C���r~���r����r:���rO���r���r���r���r������r���zFileInput.filelinenoc�����������������C���s,���|�j�rz|�j����W�S��ty���Y�dS�w�dS�)N���)r���r ���rD���rO���r���r���r���r ������s����zFileInput.filenoc�����������������C���s ���|�j�dkS�)Nr$���r����rO���r���r���r���r ������s��� zFileInput.isfirstlinec�����������������C���r~���r���)r;���rO���r���r���r���r������r���zFileInput.isstdin�NFr���)�__name__� __module__�__qualname__rL���rP���r���rS���rX���rY���r_���rd���r���rk���r[���r���r���r���r ���r ���r����classmethodr����__class_getitem__r���r���r���r���r�������s,�����4I r���ro���c����������������C���s����|d�u�r d|vr d}t�j�|��d�}|dkr!dd�l}|�|�|�}n|dkr0dd�l}|�|�|�}nt|�|||d�S�d|vrDtj|||d�}|S�)Nr&���rm���r$���z.gzr���z.bz2ro���) r-����path�splitext�gziprt����bz2ZBZ2File�io� TextIOWrapper)r���r���r���r���Zextr�����streamr����r���r���r���r ������s���r ���c��������������������s������fdd�}|S�)Nc��������������������s���t�|�|���d�S�)Nro���)rt���)r���r���ro���r���r���r������s���zhook_encoded.<locals>.openhookr���)r���r���r���r���ro���r���r������s���r���c������������������C���s����dd�l�}�d}d}|���tjdd���d�\}}|D�]\}}|dkr!d}|dkr'|}qt|||d�D�]1}|d d���d kr?|d�d ��}|d d���dkrM|d�d ��}tdt��t��t��t��rZd p[d|f���q/tdt��t��t��f���d�S�)Nr���Fr$���zib:z-iTz-b)r���r���r����� � z%d: %s[%d]%s %s�*r���z %d: %s[%d]) �getoptr0���r1���r����printr���r���r���r ���)r����r���r���Zopts�args�o�ar^���r���r���r����_test���s���� �r�����__main__r����r���)r����r0���r-����typesr����__all__r���r���r���r���r���r���r���r ���r ���r���r���r ���r���r����r����r���r���r���r����<module>���s2����C� �{ �