python (3.12.0)

(root)/
lib/
python3.12/
__pycache__/
linecache.cpython-312.opt-1.pyc

ˑe:`dZddlZddlZddlZddlZgdZiZdZd
dZd
dZ	d
dZ
d
dZd	Zy)zCache lines from Python source files.

This is intended to read lines from modules imported -- hence if a filename
is not found, it will look down the module search path for a file by
that name.
N)getline
clearcache
checkcache	lazycachec,tjy)zClear the cache entirely.N)cacheclear=/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/linecache.pyrrs	KKMrcZt||}d|cxkrt|krny||dz
Sy)z~Get a line for a Python source file from the cache.
    Update the cache if it doesn't contain an entry for this file already.)getlineslen)filenamelinenomodule_globalsliness    rrrs8
X~.EF c%j 
VaZ  
rc|tvr#t|}t|dk7rt|dS	t||S#t$rt	gcYSwxYw)zGet the lines for a Python source file from the cache.
    Update the cache if it doesn't contain an entry for this file already.r)rrupdatecacheMemoryErrorr)rrentrys   rrr$sZ5hu:??1%%8^44	s9AAc|ttj}n
|tvr|g}ny|D]o}t|}t|dk(r|\}}}}|%	t	j
|}||jk7s||jk7sZtj|dqy#t$rtj|dYwxYw)zUDiscard cache entries that are out of date.
    (This is not checked upon each call!)Nr)
listrkeysrosstatOSErrorpopst_sizest_mtime)r	filenamesrsizemtimerfullnamers        rrr4s&		U	J	&hu:?',$eUH=	778$D4<<5DMM#9IIh%&	IIh%	sB##CCc|tvr+tt|dk7rtj|d|r"|jdr|j	drgS|}	tj|}	t#j$|5}|j'}	ddd	r!|	dj	ds
|	dxxdz
cc<|j,|j.}}
|
||	|ft|<|	S#t$r |}t||ru	t|d}|gcYSt|d|jDcgc]}|dz	ncc}wc}|ft|<t|dcYS#ttf$rYnwxYwt
jj|rgcYStjD]_}	t
jj||}n#tt f$rY6wxYw	tj|}n#t$rY]wxYwgcYSYwxYw#1swYxYw#tt(t*f$rgcYSwxYw)	zUpdate a cache entry and return its list of lines.
    If something's wrong, print a message, discard the cache entry,
    and return an empty list.rN<>r
r)rrr!
startswithendswithrrr r
splitlinesImportErrorpathisabssysjoin	TypeErrorAttributeErrortokenizeopen	readlinesUnicodeDecodeErrorSyntaxErrorr"r#)rrr'rbasenamedatalinedirnamefprr%r&s            rrrPs5
5uX1$IIh%++C0X5F5Fs5K	H*wwx T
]]8
$	#LLNE	#
U2Y''-
b	T	,,

%DE5(2E(OLe(X~.
*Xq)+<II-1__->?TTD[??	#hXq)) )

"77=="Ixx	G
77<<:~.


wwx(

	I	I(T	#	#'5	sC+3H%HH%+HE#HH7E
H#E52H4E55$HH/ GHG"H!G""H&G=;H=	H	HH		HHH"H%%H>=H>c|tvrtt|dk(ryy|r"|jdr|jdry|rnd|vrj|d}|j	dx} |j	d	x}r
	|j
}t|d
d}|r#|r!tj||}|ft|<yy#t$rY>wxYw)aSeed the cache for filename with module_globals.

    The module loader will be asked for the source only when getlines is
    called, not immediately.

    If there is an entry in the cache already, it is not altered.

    :return: True if a lazy load is registered in the cache,
        otherwise False. To register such a load a module loader with a
        get_source method must be found, the filename must be a cacheable
        filename, and the filename must not be already cached.
    rTFr)r*__name__
__loader__N__spec__
get_source)
rrr-r.getloaderr6getattr	functoolspartial)rrnamerGspecrE	get_liness       rrrs5uX1$++C0X5F5Fs5K*6j)$((66F?%))*55t5![[FV\48
J!))*d;I(lE(O&s7B66	CC)N)
__doc__rIr3rr7__all__rrrrrrrr
rr<module>rPsD
	
>
	

 &8@F#r