HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/python36/lib64/python3.6/__pycache__/linecache.cpython-36.pyc
3

� f��@sndZddlZddlZddlZddlZdddgZddd�Ziadd�Zddd	�Z	dd
d�Z
ddd�Zd
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�
checkcachecCs:t||�}d|ko t|�knr2||dSdSdS)N��)�getlines�len)�filename�lineno�module_globals�lines�r
�./opt/alt/python36/lib64/python3.6/linecache.pyrs
cCsiadS)zClear the cache entirely.N)�cacher
r
r
rrscCsR|tkr(t|}t|�dkr(t|dSy
t||�Stk
rLt�gSXdS)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.r�N)rr�updatecache�MemoryErrorr)r	r�entryr
r
rr%s
rcCs�|dkrttj��}n|tkr&|g}ndSx~|D]v}t|}t|�dkrJq0|\}}}}|dkr`q0ytj|�}Wntk
r�t|=w0YnX||jks�||jkr0t|=q0WdS)zUDiscard cache entries that are out of date.
    (This is not checked upon each call!)Nr)	�listr�keysr�os�stat�OSError�st_size�st_mtime)r	�	filenamesr�size�mtimer�fullnamerr
r
rr5s&
c"Cs�|tkrtt|�dkrt|=|s8|jd�r<|jd�r<gS|}ytj|�}W�ntk
�rV|}t||�r�yt|d�}Wnttfk
r�Yn<X|dkr�gSt|�ddd�|j	�D�|ft|<t|dStj
j|�r�gSxjtj
D]\}ytj
j
||�}Wnttfk
�r w�YnXytj|�}PWq�tk
�rHYq�Xq�WgSYnXy"tj|��}|j�}WdQRXWntk
�r�gSX|�r�|d
jd	��r�|dd	7<|j|j}	}
|	|
||ft|<|S)z�Update 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|]}|d�qS)�
r
)�.0�liner
r
r�
<listcomp>qszupdatecache.<locals>.<listcomp>rr!���r%)rr�
startswith�endswithrrr�	lazycache�ImportError�
splitlines�path�isabs�sys�join�	TypeError�AttributeError�tokenize�open�	readlinesrr)r	rrr�basename�data�dirname�fprrrr
r
rrRsV



rcCs�|tkr tt|�dkrdSdS|s:|jd�r>|jd�r>dS|r�d|kr�|jd�}|d}t|dd	�}|r�|r�tj||�}|ft|<dSdS)
a�Seed 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'�get�getattr�	functools�partial)r	r�name�loaderr:�	get_linesr
r
rr(�s


r()N)N)N)N)
�__doc__r=r-rr1�__all__rrrrrrr(r
r
r
r�<module>s




A