³ņ Zé—Dc@spdZddkZddkZdddgZdd„Zhad„Zdd„Zdd „Z dd „Z dS( sµCache lines from 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. i’’’’Ntgetlinet clearcachet checkcachecCsKt||ƒ}d|jot|ƒjno||dSndSdS(Nit(tgetlinestlen(tfilenametlinenotmodule_globalstlines((s linecache.pycR s$cCs hadS(sClear the cache entirely.N(tcache(((s linecache.pycRscCs.|tjot|dSnt||ƒSdS(ssGet the lines for a file from the cache. Update the cache if it doesn't contain an entry for this file already.iN(R t updatecache(RR((s linecache.pycR!s cCsŪ|djotiƒ}n|tjo |g}ndSx™|D]‘}t|\}}}}|djoqBnyti|ƒ}Wn tij ot|=qBnX||ijp||ijo t|=qBqBWdS(sUDiscard cache entries that are out of date. (This is not checked upon each call!)N(tNoneR tkeystoststatterrortst_sizetst_mtime(Rt filenamestsizetmtimeR tfullnameR((s linecache.pycR+s"     cCs|tjo t|=n| p|d|ddjogSn|}yti|ƒ}Wn°tij o”}tii|ƒd}|od|joō|idƒ}|d}t|dd ƒ}|o¾|o·|i |idƒddƒo’y||ƒ} Wnt t fj oq†X| d jogSnt | ƒd g} | i ƒD]} | | d qR~ |ft|it __loader__t__name__t get_sourcet.s itrUN(R RRRtpathtsplittgettgetattrR t startswitht ImportErrortIOErrorRt splitlinestsystjoint TypeErrortAttributeErrortopent readlinestcloseRR(RRRRtmsgtbasenametnametloaderRtdatat_[1]tlinetdirnametfpR RR((s linecache.pycR DsZ  ! !  5     ( t__doc__R$Rt__all__R RR RRRR (((s linecache.pycss