B Fi' @sjddlZddlZddlZddlZdddgZdddZiaddZdddZdd dZ dd d Z d d Z dS)Ngetline clearcache checkcachecCs:t||}d|kr"t|kr2nn ||dSdSdS)N)getlineslen)filenamelinenomodule_globalslinesr ,/opt/alt/python37/lib/python3.7/linecache.pyrs  cCsiadS)N)cacher r r rrscCsR|tkr(t|}t|dkr(t|dSy t||Stk rLtgSXdS)Nr)rr updatecache MemoryErrorr)r r entryr r rr%s   rc Cs|dkrtt}n|tkr&|g}ndSx|D]}t|}t|dkrJq0|\}}}}|dkr`q0yt|}Wn"tk rt|dw0YnX||jks||j kr0t|dq0WdS)Nr) listrkeysrosstatOSErrorpopst_sizest_mtime)r filenamesrsizemtimer fullnamerr r rr5s&    c Cs|tkr$tt|dkr$t|d|r<|dr@|dr@gS|}yt|}Wntk rZ|}t||ryt|d}Wnt tfk rYnrcSsg|] }|dqS) r ).0liner r r qszupdatecache..rr")rrr startswithendswithrrr lazycache ImportError splitlinespathisabssysjoin TypeErrorAttributeErrortokenizeopen readlinesrr) r r rrbasenamedatadirnamefpr rrr r rrRsV         rcCs|tkr tt|dkrdSdS|r8|dr<|drr.rr2__all__rrrrrrr)r r r rs     A