python (3.12.0)
ˑe: ` d Z ddlZddlZddlZddlZg dZi Zd Zd
dZd
dZ d
dZ
d
dZd Zy)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 , t j y)zClear the cache entirely.N)cacheclear =/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/linecache.pyr r s KKMr c Z t | | }d|cxk rt | k rn y||dz
S y)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 s8
X~.EF c%j
VaZ
r c | t v r#t | }t | dk7 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 $ sZ 5hu:??1%%8^44 s 9 AAc | t t j }n
| t v r| g}ny|D ]o } t | }t | dk( r|\ }}}}|% t j
| }||j k7 s||j k7 sZt j | d q y# t $ r t j | d Y w xY w)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 &hu:?',$eUH= 778$D 4<<5DMM#9IIh%& IIh% s B##CCc | t v r+t t | dk7 rt j | d | r"| j d r| j d rg S | } t j | } t# j$ | 5 }|j'