????

Your IP : 3.146.176.29


Current Path : /lib/python3.10/importlib/__pycache__/
Upload File :
Current File : //lib/python3.10/importlib/__pycache__/resources.cpython-310.pyc

o

�*�gI�@s�ddlZddlZddlmZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
dd	lmZmZdd
lmZddlmZddlmZmZmZdd
lmZddlmZmZddlmZddlmZgd�Z ee!efZ"ee!ej#fZ$de"de$defdd�Z%		d3de"de$de!de!def
dd�Z&de"de$de'fdd�Z(		d3de"de$de!de!de!f
dd �Z)de"de$dd!fd"d#�Z*d$d%�Z+d&d'�Z,d(d)�Z-de"d*e!de.fd+d,�Z/de"dee!fd-d.�Z0ed/d0��Z1e1�2e�d1d2��Z3dS)4�N�)�_common)�as_file�files)�ResourceReader)�suppress)�ResourceLoader)�
ModuleSpec)�BytesIO�
TextIOWrapper)�Path)�
ModuleType)�ContextManager�Iterable�Union)�cast)�BinaryIO�TextIO)�Sequence)�singledispatch)�Package�Resourcerr�contentsr�is_resource�open_binary�	open_text�path�read_binary�	read_text�package�resource�returnc	Cs&t�|�}t�|�}t�|�}|dur|�|�Stt|j�}|jdur'|j}n|j	dur8t
j�t
j�
|j	��g}|D]N}t
j�||�}z	t|dd�WSty�tt|j�}d}t|jd�rztt��
|�|�}Wd�n1suwY|dur�t|�YSYq:wt|�d|j����)zDReturn a file-like object opened for binary reading of the resource.N�rb)�mode�get_dataz resource not found in )r�normalize_path�get_package�get_resource_reader�
open_resourcerr	�__spec__�submodule_search_locations�origin�osr�dirname�abspath�join�open�OSErrorr�loader�hasattrrr$r
�FileNotFoundError�name)	rr �reader�spec�paths�package_path�	full_pathr2�data�r<�*/usr/lib/python3.10/importlib/resources.pyr(s4






���r�utf-8�strict�encoding�errorscCstt||�||d�S)zBReturn a file-like object opened for text reading of the resource.)r@rA)rr)rr r@rAr<r<r=rJs�rcCs6t||��}|��Wd�S1swYdS)z+Return the binary contents of the resource.N)r�read)rr �fpr<r<r=rVs$�rcCs:t||||��}|��Wd�S1swYdS)z�Return the decoded string of the resource.

    The decoding-related arguments have the same semantics as those of
    bytes.decode().
    N)rrB)rr r@rArCr<r<r=r\s$�rzContextManager[Path]cCs@t�t�|��}|rt|t�|��St�t�|��t�|���S)akA context manager providing a file path object to the resource.

    If the resource does not already exist on its own on the file system,
    a temporary file will be created. If the file was created, the file
    will be deleted upon exiting the context manager (no exception is
    raised if the file was deleted prior to the context manager
    exiting).
    )rr'r&�_path_from_readerr%rr�joinpath)rr r6r<r<r=rks����rcCst||�p	t||�S�N)�_path_from_resource_path�_path_from_open_resource�r6r r<r<r=rD�s�rDcCs:tt��t|�|��Wd�S1swYdSrF)rr4r�
resource_pathrIr<r<r=rG�s
$�rGcCs$t�|�|����}tj|j|d�S)N)�suffix)�ior
r(rBr�	_tempfile)r6r �savedr<r<r=rH�srHr5cCsZt�|�}t�|�t�|�}|dur|�|�Stt|��}||vr$dSt�|�|��S)zYTrue if 'name' is a resource inside 'package'.

    Directories are *not* resources.
    NF)	rr&r%r'r�setr�from_package�is_file)rr5r6�package_contentsr<r<r=r�s



rcCsTt�|�}t�|�}|durt|���St�|�}|��r(tdd�|��D��SgS)z�Return an iterable of entries in 'package'.

    Note that not all entries are resources.  Specifically, directories are
    not considered resources.  Use `is_resource()` on each entry returned here
    to check if it is a resource or not.
    Ncss�|]}|jVqdSrF)r5)�.0�itemr<r<r=�	<genexpr>�s�zcontents.<locals>.<genexpr>)	rr&r'�_ensure_sequencerrP�is_dir�list�iterdir)rr6�
transversabler<r<r=r�s


rcCst|�SrF)rX��iterabler<r<r=rV�srVcCs|SrFr<r[r<r<r=�_�sr])r>r?)4r,rL�rrr�abcr�
contextlibr�
importlib.abcr�importlib.machineryr	r
r�pathlibr�typesr
�typingrrrr�	typing.iorr�collections.abcr�	functoolsr�__all__�strr�PathLikerrr�bytesrrrrDrGrH�boolrrrV�registerr]r<r<r<r=�<module>s~%�����
�	�����
���
�


Page not found | The NCLEX Doctor

Page not found!

Sorry, this page is not available...