AlkantarClanX12

Your IP : 52.15.238.221


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/fileinput.cpython-37.opt-2.pyc

B

YI~d!9�@s�ddlZddlZdddddddd	d
ddd
gZdad dd�Zdd�Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dd	�Zdd
�ZGdd�d�Z
dd�Zd!dd
�Zdd�Zedkr�e�dS)"�N�input�close�nextfile�filename�lineno�
filelineno�fileno�isfirstline�isstdin�	FileInput�hook_compressed�hook_encodedF��rcCs(trtjrtd��t||||||�atS)Nzinput() already active)�_state�_file�RuntimeErrorr)�files�inplace�backup�bufsize�mode�openhook�r�./opt/alt/python37/lib64/python3.7/fileinput.pyrSs	
cCst}da|r|��dS)N)rr)�staterrrrascCststd��t��S)Nzno active input())rrrrrrrris
cCststd��t��S)Nzno active input())rrrrrrrrwscCststd��t��S)Nzno active input())rrrrrrrr�scCststd��t��S)Nzno active input())rrrrrrrr�scCststd��t��S)Nzno active input())rrrrrrrr�scCststd��t��S)Nzno active input())rrr	rrrrr	�scCststd��t��S)Nzno active input())rrr
rrrrr
�sc@s�eZdZd(dd�Zdd	�Zd
d�Zdd
�Zdd�Zdd�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zd d!�Zd"d#�Zd$d%�Zd&d'�ZdS))rNFrrrcCst|t�r|f}nBt|tj�r,t�|�f}n(|dkrBtjdd�}|sLd}nt|�}||_||_	||_
|r�ddl}|jdt
dd�d|_d|_d|_d|_d|_d|_d|_d|_|dkr�td	��d
|kr�ddl}|�dt
d�||_|�r
|r�td��t|��s
td
��||_dS)N�)�-rz!bufsize is deprecated and ignored�)�
stacklevelF)rZrU�U�rbz=FileInput opening mode must be one of 'r', 'rU', 'U' and 'rb'r z'U' mode is deprecatedz4FileInput cannot use an opening hook in inplace modez#FileInput openhook must be callable)�
isinstance�str�os�PathLike�fspath�sys�argv�tuple�_files�_inplace�_backup�warnings�warn�DeprecationWarning�_savestdout�_output�	_filename�_startlineno�_filelinenor�_isstdin�_backupfilename�
ValueError�_mode�callable�	_openhook)�selfrrrrrrr-rrr�__init__�sJ


zFileInput.__init__cCs|��dS)N)r)r;rrr�__del__�szFileInput.__del__cCsz|��Wdd|_XdS)Nr)rr*)r;rrrr�szFileInput.closecCs|S)Nr)r;rrr�	__enter__�szFileInput.__enter__cCs|��dS)N)r)r;�type�value�	tracebackrrr�__exit__�szFileInput.__exit__cCs|S)Nr)r;rrr�__iter__�szFileInput.__iter__cCs:x4|��}|r |jd7_|S|js*t�|��qWdS)Nr)�	_readliner4r�
StopIterationr)r;�linerrr�__next__�szFileInput.__next__cCs>||��krtd��y|��Stk
r8td��YnXdS)Nzaccessing lines out of orderzend of input reached)rrrGrE�
IndexError)r;�irrr�__getitem__szFileInput.__getitem__cCs�|j}d|_|r|t_|j}d|_z|r0|��Wd|j}d|_y|`Wntk
r\YnXz|rr|jsr|��Wd|j	}d|_	|r�|j
s�yt�|�Wnt
k
r�YnXd|_XXdS)NF)r0r'�stdoutr1rrrD�AttributeErrorr5r6r,r$�unlink�OSError)r;Z
savestdout�output�fileZbackupfilenamerrrr
s4

zFileInput.nextfilecCs:x4|��}|r |jd7_|S|js*|S|��qWdS)Nr)rDr4rr)r;rFrrr�readline+szFileInput.readlinecCs|jsd|jkrdSdS|jd|_|jdd�|_|��|_d|_d|_d|_d|_|jdkr�d|_d|jkr�t	t
jd	t
j�|_nt
j|_d
|_�n\|j�r�t
�|j�|jp�d|_yt
�|j�Wntk
r�YnXt
�|j|j�t|j|j�|_yt
�|j���j}Wn$tk
�r6t|jd�|_Yn~Xt
jt
jBt
jB}tt
d
��r`|t
jO}t
�|j||�}t
�|d�|_ytt
d��r�t
�|j|�Wntk
�r�YnXt
j|_ |jt
_n,|j!�r�|�!|j|j�|_nt|j|j�|_|jj"|_#|�#�S)N�b�rrrFrz<stdin>�bufferTz.bak�w�O_BINARY�chmod)$r*r8r2rr3r4rr5r6�getattrr'�stdinr+r$r&r,rMrN�rename�open�fstatr�st_moder1�O_CREAT�O_WRONLY�O_TRUNC�hasattrrV�fdopenrWrKr0r:rQrD)r;Zpermr�fdrrrrD6s\







zFileInput._readlinecCs|jS)N)r2)r;rrrrpszFileInput.filenamecCs|j|jS)N)r3r4)r;rrrrsszFileInput.linenocCs|jS)N)r4)r;rrrrvszFileInput.filelinenocCs0|jr(y
|j��Stk
r$dSXndSdS)N���)rrr7)r;rrrrys
zFileInput.filenocCs
|jdkS)Nr)r4)r;rrrr	�szFileInput.isfirstlinecCs|jS)N)r5)r;rrrr
�szFileInput.isstdin)NFrrrN)�__name__�
__module__�__qualname__r<r=rr>rBrCrGrJrrQrDrrrrr	r
rrrrr�s$

+:	cCsVtj�|�d}|dkr,ddl}|�||�S|dkrHddl}|�||�St||�SdS)Nrz.gzrz.bz2)r$�path�splitext�gzipr[�bz2ZBZ2File)rrZextrjrkrrrr�scs��fdd�}|S)Ncst||��d�S)N)�encoding�errors)r[)rr)rlrmrrr�szhook_encoded.<locals>.openhookr)rlrmrr)rlrmrr
�scCs�ddl}d}d}|�tjdd�d�\}}x(|D] \}}|dkrDd}|dkr0|}q0Wxtt|||d�D]b}|d	d�d
kr�|dd	�}|d	d�dkr�|dd	�}tdt�t�t�t�r�d
p�d|f�qdWtdt�t�t�f�dS)NrFrzib:z-iTz-b)rrrd�
�
z%d: %s[%d]%s %s�*rz
%d: %s[%d])	�getoptr'r(r�printrrrr	)rqrrZopts�args�o�arFrrr�_test�s"rv�__main__)NFrrrN)N)r'r$�__all__rrrrrrrrr	r
rrr
rvrerrrr�<module>Ks*


	

			[