Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.190.153.90
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : fileinput.cpython-310.opt-2.pyc
o

^bp?�@s�	ddlZddlZddlZddlmZgd�Zdad$ddddd�dd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZGdd�d�Zddd�dd�Zd%dd �Zd!d"�Zed#kree�dSdS)&�N)�GenericAlias)�input�close�nextfile�filename�lineno�
filelineno�fileno�isfirstline�isstdin�	FileInput�hook_compressed�hook_encodedF��r��mode�openhook�encoding�errorsc	Cs.	tr
tjr
td��t|||||||d�atS)Nzinput() already activer)�_state�_file�RuntimeErrorr)�files�inplace�backuprrrr�r�2/usr/local/python-3.10/lib/python3.10/fileinput.pyrNs
�rcCs	t}da|r
|��dSdS�N)rr)�staterrrr]s�rcC�	tstd��t��S�Nzno active input())rrrrrrrres	rcCr r!)rrrrrrrrs�rcCr r!)rrrrrrrr|�rcCr r!)rrrrrrrr�r#rcCr r!)rrr	rrrrr	�r"r	cCr r!)rrr
rrrrr
�r"r
cCr r!)rrrrrrrr�r"rc@s�eZdZ	d(ddddd�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'�Zee�ZdS))rNFrrrc	CsPt|t�r	|f}n!t|tj�rt�|�f}n|dur!tjdd�}|s&d}nt|�}||_||_	||_
d|_d|_d|_
d|_d|_d|_d|_d|_||_||_tjjrld|vrl|durl|durlddl}|�dtd�|dvrttd	��d
|vr�ddl}|�dtd�||_d
|vr�|�dd
�nd
|_|r�|r�td��t|�s�td��||_ dS)N�)�-rF�bz"'encoding' argument not specified.�)rZrU�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)	�selfrrrrrrrrArrr�__init__�s`
�����
zFileInput.__init__cC�|��dSr�r�rKrrr�__del__��zFileInput.__del__cCsz
|��Wd|_dSd|_w)Nr)rr3rOrrrr�s
zFileInput.closecC�|SrrrOrrr�	__enter__��zFileInput.__enter__cCrMrrN)rK�type�value�	tracebackrrr�__exit__�rQzFileInput.__exit__cCrRrrrOrrr�__iter__�rTzFileInput.__iter__cCs4	|��}|r|jd7_|S|jst�|��q�NTr$)�	_readliner:r�
StopIterationr�rK�linerrr�__next__���zFileInput.__next__cCsNddl}|jdtdd�||��krtd��z|��WSty&td��w)NrzTSupport for indexing FileInput objects is deprecated. Use iterator protocol instead.r')�
stacklevelzaccessing lines out of orderzend of input reached)rArBrErrr_r\�
IndexError)rK�irArrr�__getitem__	s�
�zFileInput.__getitem__cCs�|j}d|_|r|t_|j}d|_zm|r|��W|j}d|_z|`Wn	ty,Ynwz+|r7|js7|��W|j	}d|_	|rT|j
sTzt�|�Wn	t
ySYnwd|_dS|j	}d|_	|r{|j
s{z
t�|�Wd|_wt
yzYd|_wwd|_w|j}d|_z|`Wn	ty�Ynwz0|r�|js�|��W|j	}d|_	|r�|j
s�z
t�|�Wd|_wt
y�Yd|_wwd|_w|j	}d|_	|r�|j
s�z
t�|�Wd|_wt
y�Yd|_wwd|_w)NF)r6r0�stdoutr7rrr[�AttributeErrorr;r<r5r-�unlink�OSError)rKZ
savestdout�output�fileZbackupfilenamerrrrs���
�

�
����
�
���
��zFileInput.nextfilecCs4	|��}|r|jd7_|S|js|S|��qrZ)r[r:rrr]rrr�readline6r`zFileInput.readlinecCsD|jsd|jvr
dSdS|jd|_|jdd�|_|��|_d|_d|_d|_d|_d|jvr6|j	p4d}nd}|jdkrWd	|_d|jvrOt
tjd
tj�|_ntj|_d|_n�|j
r�t�|j�|jpcd|_zt�|j�Wn	tywYnwt�|j|j�t|j|j|d
�|_zt�|j���j}Wnty�t|j|j|d
�|_Yn9wtjtjBtjB}ttd�r�|tjO}t�|j||�}tj||j|d
�|_z	t� |j|�Wn	ty�Ynwtj!|_"|jt_!n/|j#�r
|j	dur�|�#|j|j�|_�q|j#|j|j|j	|j$d�|_nt|j|j||j$d�|_|jj%|_&|�&�S)Nr&�rrr$F�localer%z<stdin>�bufferTz.bak)r�O_BINARY�rr)'r3rFr8rr9r:rr;r<r=�getattrr0�stdinr4r-r/r5rgrh�rename�open�fstatr	�st_moderHr7�O_CREAT�O_WRONLY�O_TRUNC�hasattrro�fdopen�chmodrer6rJr>rkr[)rKr�permr�fdrrrr[Asp




���

�


�
zFileInput._readlinecC�|jSr)r8rOrrrr��zFileInput.filenamecCs|j|jSr)r9r:rOrrrr�rQzFileInput.linenocCrr�r:rOrrrr�r�zFileInput.filelinenocCs,|jrz|j��WStyYdSwdS)N���)rr	rDrOrrrr	�s�zFileInput.filenocCs
|jdkS)Nr$r�rOrrrr
�s
zFileInput.isfirstlinecCrr)r;rOrrrr�r�zFileInput.isstdin�NFr)�__name__�
__module__�__qualname__rLrPrrSrXrYr_rdrrkr[rrrr	r
r�classmethodr�__class_getitem__rrrrr�s,�4F	rrpcCs�|durd}tj�|�d}|dkrddl}|�||�}n|dkr,ddl}|�||�}nt||||d�Sd|vr@tj|||d�}|S)Nrmr$z.gzrz.bz2rpr&)	r-�path�splitext�gziprt�bz2�BZ2File�io�
TextIOWrapper)rrrr�extr��streamr�rrrr
�sr
cs��fdd�}|S)Ncst||��d�S)Nrp)rt)rrrprrr�szhook_encoded.<locals>.openhookr)rrrrrprr�srcCs�ddl}d}d}|�tjdd�d�\}}|D]\}}|dkr!d}|dkr'|}qt|||d�D]1}|d	d�d
kr?|dd	�}|d	d�dkrM|dd	�}tdt�t�t�t�rZd
p[d|f�q/tdt�t�t�f�dS)NrFr$zib:z-iTz-b)rrr��
�
z%d: %s[%d]%s %s�*rz
%d: %s[%d])	�getoptr0r1r�printrrrr
)r�rrZopts�args�o�ar^rrr�_test�s�
�r��__main__r�r)r�r0r-�typesr�__all__rrrrrrrr	r
rrr
rr�r�rrrr�<module>s2C�	

			x

�
© 2025 GrazzMean