Your IP : 3.148.117.240
o
6��fI � @ s� d dl Z d dlZddlmZ ddlmZmZ ddlmZ d dlm Z d dl
mZ d dlm
Z
d d lmZmZ d d
lmZ d dlmZ d dlmZmZmZ d d
lmZ d dlmZmZ d dlmZ d dlmZ g d�Z ee!ef Z"ee!e j#f Z$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�Resourcer r �contentsr �is_resource�open_binary� open_text�path�read_binary� read_text�package�resource�returnc C s( t �|�}t �| �} t �| �}|d ur|�|�S tt| j�}|jd ur(|j}n|j d ur9t
j�t
j�
|j ��g}|D ]N}t
j�||�}z t|dd�W S ty� tt|j�}d }t|jd�r{tt��
|�|�}W d � n1 svw Y |d ur�t|� Y S Y q;w t|�d|j����)N�rb)�mode�get_dataz resource not found in )r �normalize_path�get_package�get_resource_reader�
open_resourcer r �__spec__�submodule_search_locations�origin�osr �dirname�abspath�join�open�OSErrorr �loader�hasattrr r$ r
�FileNotFoundError�name) r r �reader�spec�pathsZpackage_path� full_pathr2 �data� r; �:/opt/alt/python310/lib64/python3.10/importlib/resources.pyr ( s6
���r �utf-8�strict�encoding�errorsc C s t t| |�||d�S )N)r? r@ )r r )r r r? r@ r; r; r<