/opt/imh/python3.13/lib/python3.13/__pycache__
Edit: /opt/imh/python3.13/lib/python3.13/__pycache__/linecache.cpython-313.pyc (8567B)
et d S r / SQr0 r0 rS rS
S jrS
S jrS rS rS r S
S jr
S
S
jrS rS r
g)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.
)getline
clearcache
checkcache lazycachec , [ R 5 g)zClear the cache entirely.N)cacheclear //opt/imh/python3.13/lib/python3.13/linecache.pyr r s KKMr
Nc Z [ X5 nSUs=:: a [ U5 :: a
O gX1S-
$ g)zzGet 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 r r s4
X.EF c%j
aZ
r
c U [ ; a$ [ U n[ U5 S:w a [ U S $ [ X5 $ ! [ a [ 5 / s $ f = f)z}Get 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
)r r updatecacheMemoryErrorr )r r entrys r r r sX 5hu:??1%%844 s
; AAc Z [ U 5 nSUs=:: a [ U5 :: a
O gX!S-
$ g)Nr
r )_getlines_from_coder )r r r s r _getline_from_coder 0 s2 )EF c%j
aZ
r
c H U R U R U R 4$ N)co_filenameco_qualnameco_firstlineno)codes r _make_keyr# 6 s! d..0C0CDDr
c x [ U 5 nU[ ; a$ [ U n[ U5 S:w a [ U S $ / $ )Nr
r )r# _interactive_cacher )r" code_idr s r r r 9 s> oG$$"7+u:?%g.q11
Ir
c U c# [ R 5 R 5 nOU /nU Hu n [ U n[ U5 S:X a M Uu p4pVUc M( SSKn UR U5 nX8R :w d XHR :w d M_ [ R U S5 Mw g! [ a M f = f! [ a gf = f! [ [ 4 a [ R U S5 M f = f)zQDiscard cache entries that are out of date.
(This is not checked upon each call!)Nr
)
r copykeysKeyErrorr osImportErrorstatOSError
ValueErrorpopst_sizest_mtime) r filenamesr sizemtimer fullnamer, r. s r r r B s JJL%%' J (OE u:?',$U= 778$D <<5MM#9IIh%/ $ IIh% s5 B&B7C&
B43B47
CC&C21C2c " SSK nSSKnSSKnU [ ; a, [ [ U 5 S:w a [ R
U S5 U ( a, U R S5 ( a U R S5 ( a / $ U n UR U5 n UR' U5 nUR) 5 nSSS5 W( d S/nO&US R S5 ( d
US== S-
ss' UR. UR0 pXX4[ U ' U$ ! [ a / s $ f = f! [ Ga( U n[ X5 ( az [ U S " 5 nUc / s $ [ U5 SUR 5 V s/ s H oS- PM Os sn f sn U4[ U ' [ U S s $ ! [ [ 4 a Of = fUR R U 5 ( a / s $ UR Hc n
UR R X5 nO! [ [" 4 a M3 f = f UR U5 n GM ! [ [$ 4 a Ma f = f / s $ [$ a / s $ f = f! , ( d f GN= f! [ [* [, 4 a / s $ f = f) 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.r( Nr
<>
r )r, systokenizer- r r r1
startswithendswithr. r/ r
splitlinespathisabsjoin TypeErrorAttributeErrorr0 open readlinesUnicodeDecodeErrorSyntaxErrorr2 r3 )r r r, r= r> r7 r. basenamedatalinedirnamefpr r5 r6 s r r r f se
5uX1$IIh%++C00X5F5Fs5K5K H,wwx X
]]8
$LLNE %
2Y
%
%
b T ,,
%52E(OLG ( X..
*Xq)+ < II-1__->?->TD[->? #h Xq)) )
" 77==""IxxG
77<<:~.
wwx(Z(
I %
$'5 s D
<D I4 I"0I4
DDI=F II2F
I F30I2F33%II*HIHIHIH4/I4IIIIII"
I1,I4 1I4 4J
Jc ^ U [ ; a [ [ U 5 S:X a ggU ( a, U R S5 ( a U R S5 ( a gU( a SU; az UR S5 n[ USS 5 =( d US n[ US
S 5 nUc UR S5 n[ USS 5 mU( a T( a U4U4S
jjnU4[ U ' gg)a Seed 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.
r
TFr9 r: __name____spec__nameNloader
__loader__
get_sourcec > T" U /UQ70 UD6$ r r )rS argskwargsrV s r get_lineslazycache.
.get_lines s !$8888r
)r r r? r@ getgetattr)r r specrS rT rZ rV s @r r r s 5uX1$++C00X5F5Fs5K5K*6!!*-tVT*HnZ.Hx.>#''5FV\48
J#
9(lE(Or
c Z [ U5 S UR 5 Vs/ s H o3S- PM snU4nU /nU( al UR 5 n U R H0 n[ U[ U 5 5 ( d M UR
U5 M2 U[ [ U 5 ' U( a Mk g g s snf )Nr; ) r rA r1 co_consts
isinstancetypeappendr% r# )r" stringrS rM r stackconsts r _register_coderg s
[
&,&7&7&9
:&9dTk&9
:
E FE
yy{^^E%d,,U# $ /49T?+ % ;s B(r )__doc____all__r r% r r r r r# r r r r rg r r
r rj sU ?
E!&HOd"H4r