python (3.11.7)
e: b d Z ddlZddlZddlZddlZg dZi Zd Zd
dZd
dZ d
dZ
d
dZd ZdS )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 8 t dS )zClear the cache entirely.N)cacheclear =/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/linecache.pyr r s KKMMMMMr c v t | | }d|cxk rt | k rn n||dz
S dS )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 r r sO
X~..EF c%jj VaZ
2r c | t v r3t | }t | dk rt | d S t | | S # t $ r t g cY S w xY w)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 )r r updatecacheMemoryErrorr )r r entrys r r r $ sx 5hu::???1%%8^444 s A A+*A+c | 't t }n| t v r| g}ndS |D ]} t | }t | dk r#|\ }}}}|- t j | }n+# t $ r t | d Y jw xY w||j k s||j k rt | d dS )zUDiscard cache entries that are out of date.
(This is not checked upon each call!)Nr )
listr keysr osstatOSErrorpopst_sizest_mtime)r filenamesr sizemtimer fullnamer s r r r 4 s && U J &