Şuanki Dizin: /proc/self/root/usr/lib64/python3.9/__pycache__/ |
Şuanki Dosya : //proc/self/root/usr/lib64/python3.9/__pycache__/linecache.cpython-39.opt-1.pyc |
a �DOgU�@sldZddlZddlZddlZddlZgd�ZiZdd�Zddd�Zddd �Z dd d�Z ddd �Zdd�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� checkcache� lazycachecCst��dS)zClear the cache entirely.N)�cache�clear�rr�!/usr/lib64/python3.9/linecache.pyrsrcCs6t||�}d|kr"t|�kr2nn||dSdS)z~Get a line for a Python source file from the cache. Update the cache if it doesn't contain an entry for this file already.��)�getlines�len)�filename�lineno�module_globals�linesrrr rs rcCsV|tvr(t|}t|�dkr(t|dSzt||�WStyPt�gYS0dS)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)rr�entryrrr r$src Cs�|durtt���}n|tvr&|g}ndS|D]�}t|}t|�dkrHq.|\}}}}|dur^q.zt�|�}Wn"ty�t�|d�Yq.Yn0||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�fullnamerrrr r4s& rc Cs|tvr$tt|�dkr$t�|d�|r<|�d�r@|�d�r@gS|}zt�|�}W�nt�yf|}t||�r�zt|d�}Wnt tfy�YnD0|dur�gYSt|�ddd�|� �D�|ft|<t|dYStj�|�r�gYSt jD]`}ztj�||�}Wnttf�y*Yq�Yn0zt�|�}W�qbWq�t�yVYq�0q�gYSYn0z8t�|��}|��}Wd�n1�s�0YWnt�y�gYS0|�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�<�>rcSsg|]}|d�qS)� r)�.0�linerrr � <listcomp>p�zupdatecache.<locals>.<listcomp>r���r$)rr r� startswith�endswithrrrr�ImportError� splitlines�path�isabs�sys�join� TypeError�AttributeError�tokenize�open� readlinesrr)rrr!r�basename�data�dirname�fprrr rrr rPs\ � , rcCs�|tvr tt|�dkrdSdS|r8|�d�r<|�d�r<dS|r�d|vr�|�d�}|d}t|dd �}|r�|r�t�||�}|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 cacheable filename, and the filename must not be already cached. r TFr"r#� __loader__�__name__� get_sourceN)rr r*r+�get�getattr� functools�partial)rr�name�loaderr=� get_linesrrr r�s r)N)N)N)N) �__doc__r@r0rr4�__all__rrrrrrrrrrr �<module>s C
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4