����JFIF���������
1#@!#!123s
D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
usr
/
lib64
/
python3.8
/
__pycache__
/
Filename :
linecache.cpython-38.opt-1.pyc
back
Copy
U ����e5d�����������������������@���sn���d�Z�ddlZddlZddlZddlZdddgZddd�Zi�add��Zddd �Z dd d�Z ddd�Zd d��ZdS�)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� checkcachec�����������������C���s:���t�|�|�}d|��kr"t|�kr2n�n||d��S�dS�d�S�)N������)�getlines�len)�filename�lineno�module_globals�lines��r ����!/usr/lib64/python3.8/linecache.pyr������s���� c�������������������C���s���i�a�dS�)zClear the cache entirely.N)�cacher ���r ���r ���r���r������s����c�����������������C���sX���|�t�kr(t�|��}t|�dkr(t�|��d�S�zt|�|�W�S��tk rR���t���g��Y�S�X�dS�)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)r���r����updatecache�MemoryErrorr���)r ���r����entryr ���r ���r���r���%���s����r���c�������������� ���C���s����|�dkrt�t����}n|�tkr&|�g}ndS�|D�]�}�t|��}t|�dkrHq.|\}}}}|dkr^q.zt�|�}W�n$�tk r����t�|�d��Y�q.Y�nX�||jks�||j kr.t�|�d��q.dS�)zUDiscard cache entries that are out of date. (This is not checked upon each call!)Nr���) �listr����keysr����os�stat�OSError�pop�st_size�st_mtime)r ���� filenamesr����size�mtimer����fullnamer���r ���r ���r���r���5���s&���� c�������������� ���C���s���|�t�kr$tt�|���dkr$t��|�d��|�r<|��d�r@|��d�r@g�S�|�}zt�|�}W��n�tk �rn���|�}t|�|�r�zt�|��d���}W�n�t tfk r����Y�nDX�|dkr�g��Y�S�t|�ddd��|� ��D��|ft�|�<�t�|��d��Y�S�tj�|��r�g��Y�S�t jD�]d}ztj�||�}W�n�ttfk �r0���Y�q�Y�nX�zt�|�}W���qjW�q��tk �r^���Y�q�X�q�g��Y�S�Y�nX�z"t�|��}|���}W�5�Q�R�X�W�n�tk �r����g��Y�S�X�|�r�|d ��d ��s�|d ��d 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���N�<�>r���c�����������������S���s���g�|�]}|d���qS�)� r ���)�.0�liner ���r ���r���� <listcomp>q���s�����zupdatecache.<locals>.<listcomp>r������r"���)r���r���r���� startswith�endswithr���r���r���� lazycache�ImportError� splitlines�path�isabs�sys�join� TypeError�AttributeError�tokenize�open� readlinesr���r���)r ���r���r���r����basename�data�dirname�fpr���r���r���r ���r ���r���r���R���s\���� ��� r���c�����������������C���s����|�t�kr tt�|���dkrdS�dS�|�r8|��d�r<|��d�r<dS�|r�d|kr�|�d�}|d�}t|dd �}|r�|r�t�||�}|ft�|�<�dS�dS�) 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. r���TFr ���r!���� __loader__�__name__� get_sourceN)r���r���r'���r(����get�getattr� functools�partial)r ���r����name�loaderr;���� get_linesr ���r ���r���r)�������s���� r)���)N)N)N)N) �__doc__r>���r.���r���r2����__all__r���r���r���r���r���r���r)���r ���r ���r ���r����<module>���s��� A