• File: fileinput.cpython-37.opt-2.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/opt/alt/python37/lib64/python3.7/__pycache__/fileinput.cpython-37.opt-2.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 7.48 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

YI~d!9@sddlZddlZdddddddd	d
ddd
gZdad ddZddZddZddZddZddZ	ddZ
dd	Zdd
ZGdddZ
ddZd!dd
ZddZedkredS)"Ninputclosenextfilefilenamelineno
filelinenofilenoisfirstlineisstdin	FileInputhook_compressedhook_encodedFrcCs(trtjrtdt||||||atS)Nzinput() already active)_state_fileRuntimeErrorr)filesinplacebackupbufsizemodeopenhookr./opt/alt/python37/lib64/python3.7/fileinput.pyrSs	
cCst}da|r|dS)N)rr)staterrrrascCststdtS)Nzno active input())rrrrrrrris
cCststdtS)Nzno active input())rrrrrrrrwscCststdtS)Nzno active input())rrrrrrrrscCststdtS)Nzno active input())rrrrrrrrscCststdtS)Nzno active input())rrrrrrrrscCststdtS)Nzno active input())rrr	rrrrr	scCststdtS)Nzno active input())rrr
rrrrr
sc@seZdZd(ddZdd	Zd
dZdd
ZddZddZddZ	ddZ
ddZddZddZ
ddZddZd d!Zd"d#Zd$d%Zd&d'ZdS))rNFrrrcCst|tr|f}nBt|tjr,t|f}n(|dkrBtjdd}|sLd}nt|}||_||_	||_
|rddl}|jdt
ddd|_d|_d|_d|_d|_d|_d|_d|_|dkrtd	d
|krddl}|dt
d||_|r
|rtdt|s
td
||_dS)N)-rz!bufsize is deprecated and ignored)
stacklevelF)rZrUUrbz=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)
isinstancestrosPathLikefspathsysargvtuple_files_inplace_backupwarningswarnDeprecationWarning_savestdout_output	_filename_startlineno_filelinenor_isstdin_backupfilename
ValueError_modecallable	_openhook)selfrrrrrrr-rrr__init__sJ


zFileInput.__init__cCs|dS)N)r)r;rrr__del__szFileInput.__del__cCsz|Wdd|_XdS)Nr)rr*)r;rrrrszFileInput.closecCs|S)Nr)r;rrr	__enter__szFileInput.__enter__cCs|dS)N)r)r;typevalue	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>||krtdy|Stk
r8tdYnXdS)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
syt|Wnt
k
rYnXd|_XXdS)NF)r0r'stdoutr1rrrDAttributeErrorr5r6r,r$unlinkOSError)r;Z
savestdoutoutputfileZbackupfilenamerrrr
s4

zFileInput.nextfilecCs:x4|}|r |jd7_|S|js*|S|qWdS)Nr)rDr4rr)r;rFrrrreadline+szFileInput.readlinecCs|jsd|jkrdSdS|jd|_|jdd|_||_d|_d|_d|_d|_|jdkrd|_d|jkrt	t
jd	t
j|_nt
j|_d
|_n\|jrt
|j|jpd|_yt
|jWntk
rYnXt
|j|jt|j|j|_yt
|jj}Wn$tk
r6t|jd|_Yn~Xt
jt
jBt
jB}tt
d
r`|t
jO}t
|j||}t
|d|_ytt
drt
|j|Wntk
rYnXt
j|_ |jt
_n,|j!r|!|j|j|_nt|j|j|_|jj"|_#|#S)NbrrrFrz<stdin>bufferTz.bakwO_BINARYchmod)$r*r8r2rr3r4rr5r6getattrr'stdinr+r$r&r,rMrNrenameopenfstatrst_moder1O_CREATO_WRONLYO_TRUNChasattrrVfdopenrWrKr0r:rQrD)r;ZpermrfdrrrrD6s\







zFileInput._readlinecCs|jS)N)r2)r;rrrrpszFileInput.filenamecCs|j|jS)N)r3r4)r;rrrrsszFileInput.linenocCs|jS)N)r4)r;rrrrvszFileInput.filelinenocCs0|jr(y
|jStk
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
rrrrrs$

+:	cCsVtj|d}|dkr,ddl}|||S|dkrHddl}|||St||SdS)Nrz.gzrz.bz2)r$pathsplitextgzipr[bz2ZBZ2File)rrZextrjrkrrrrscsfdd}|S)Ncst||dS)N)encodingerrors)r[)rr)rlrmrrrszhook_encoded.<locals>.openhookr)rlrmrr)rlrmrr
scCsddl}d}d}|tjddd\}}x(|D] \}}|dkrDd}|dkr0|}q0Wxtt|||dD]b}|d	dd
kr|dd	}|d	ddkr|dd	}tdttttrd
pd|fqdWtdtttfdS)NrFrzib:z-iTz-b)rrrd

z%d: %s[%d]%s %s*rz
%d: %s[%d])	getoptr'r(rprintrrrr	)rqrrZoptsargsoarFrrr_tests"rv__main__)NFrrrN)N)r'r$__all__rrrrrrrrr	r
rrr
rvrerrrr<module>Ks*


	

			[