grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026î   fqã@s‹dZddlZddlZddlZdddgZddd„Ziadd„Zddd „Zdd d„Z dd d „Z dS) zÃCache 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Ú checkcachecCsEt||ƒ}d|ko,t|ƒknr=||dSdSdS)NéÚ)ÚgetlinesÚlen)ÚfilenameÚlinenoÚmodule_globalsÚlines©r ú./opt/alt/python34/lib64/python3.4/linecache.pyrs" cCs iadS)zClear the cache entirely.N)Úcacher r r rrsc CsM|tkrt|dSyt||ƒSWntk rHtƒgSYnXdS)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.éN)rÚ updatecacheÚ MemoryErrorr)r r r r rr"s   rc CsÔ|dkr!ttjƒƒ}n|tkr9|g}ndSx�|D]ˆ}t|\}}}}|dkrrqDnytj|ƒ}Wntk r£t|=wDYnX||jksÂ||jkrDt|=qDqDWdS)zUDiscard cache entries that are out of date. (This is not checked upon each call!)N)ÚlistrÚkeysÚosÚstatÚOSErrorÚst_sizeÚst_mtime)r Ú filenamesÚsizeÚmtimer Úfullnamerr r rr0s       c"Cs_|tkrt|=n| s;|jdƒr?|jdƒr?gS|}ytj|ƒ}Wnktk rÅ|}|r3d|kr3|jdƒ}|d}t|ddƒ}|r3|r3y||ƒ}Wnttfk ráYq0X|dkrògSt |ƒddd„|j ƒDƒ|ft|Ú __loader__Ú__name__Ú get_sourceNcSsg|]}|d‘qS)Ú r )Ú.0Úliner r rú ks zupdatecache..rrr#éÿÿÿÿr')rÚ startswithÚendswithrrrÚgetÚgetattrÚ ImportErrorrÚ splitlinesÚpathÚisabsÚsysÚjoinÚ TypeErrorÚAttributeErrorÚtokenizeÚopenÚ readlinesrr)r r rrÚbasenameÚnameÚloaderr"ÚdataÚdirnameÚfpr rrr r rrIs\  %     #     r) Ú__doc__r0rr4Ú__all__rrrrrrr r r rÚs