HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/__pycache__/linecache.cpython-35.pyc


Fa@sdZddlZddlZddlZddlZdddgZdddZiaddZddd	Z	dd
dZ
dddZd
dZdS)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.
Ngetline
clearcache
checkcachecCsEt||}d|ko,t|knr=||dSdSdS)N)getlineslen)filenamelinenomodule_globalslinesr
/usr/lib/python3.5/linecache.pyrs"cCs
iadS)zClear the cache entirely.N)cacher
r
r
rrscCsi|tkr4t|}t|dkr4t|dSyt||SWntk
rdtgSYnXdS)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.rN)rrupdatecacheMemoryErrorr)r	rentryr
r
rr%s

rcCs|dkr!ttj}n|tkr9|g}ndSx|D]}t|}t|dkriqD|\}}}}|dkrqDytj|}Wntk
rt|=wDYnX||jks||jkrDt|=qDWdS)zUDiscard cache entries that are out of date.
    (This is not checked upon each call!)Nr)	listrkeysrosstatOSErrorst_sizest_mtime)r		filenamesrsizemtimerfullnamerr
r
rr5s&


c"Cs5|tkr)tt|dkr)t|=|sN|jdrR|jdrRgS|}ytj|}Wn0tk
r|}t||ryt|d}Wnttfk
rYnLX|dkrgSt|ddd|j	D|ft|<t|dStj
j|r!gSxutj
D]f}ytj
j
||}Wnttfk
rgw+YnXytj|}PWq+tk
rYq+Xq+WgSYnXy)tj|}|j}WdQRXWntk
rgSYnX|r|d
jd	r|dd	7<|j|j}	}
|	|
||ft|<|S)zUpdate a cache entry and return its list of lines.
    If something's wrong, print a message, discard the cache entry,
    and return an empty list.r<>rNcSsg|]}|dqS)
r
).0liner
r
r
<listcomp>qs	zupdatecache.<locals>.<listcomp>rr!r%)rr
startswithendswithrrr	lazycacheImportError
splitlinespathisabssysjoin	TypeErrorAttributeErrortokenizeopen	readlinesrr)r	rrrbasenamedatadirnamefprrrr
r
rrRsV%
#
		
	rcCs|tkr*tt|dkr&dSdS|sO|jdrS|jdrSdS|rd|kr|jd}|d}t|dd	}|r|rtj||}|ft|<dSdS)
aSeed the cache for filename with module_globals.

    The module loader will be asked for the source only when getlines is
    called, not immediately.

    If there is an entry in the cache already, it is not altered.

    :return: True if a lazy load is registered in the cache,
        otherwise False. To register such a load a module loader with a
        get_source method must be found, the filename must be a cachable
        filename, and the filename must not be already cached.
    rTFrr 
__loader____name__
get_sourceN)rrr&r'getgetattr	functoolspartial)r	rnameloaderr:	get_linesr
r
rr(s
%

r()
__doc__r=r-rr1__all__rrrrrrr(r
r
r
r<module>sA