Your IP : 3.145.51.35
o
6��f� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlmZm Z m
Z
ddlmZm
Z
ddlmZ eejef Zdd� Zdd � Zd
d� Zdd
� Zdd� Zdd� Zejde jd�dd��Zejdd� �Ze�ej�ejdd� ��Z dS )� N)�Union�Any�Optional� )�ResourceReader�Traversable)� wrap_specc C s t t| ��S )z3
Get a Traversable resource from a package
)�from_package�get_package)�package� r �8/opt/alt/python310/lib64/python3.10/importlib/_common.py�files s r c C s. t | �}tj�|�\}}|rt| �d���|S )z�Normalize a path by ensuring it is a string.
If the resulting string contains path separators, an exception is raised.
z must be only a file name)�str�os�path�split�
ValueError)r Zstr_path�parent� file_namer r r
�normalize_path s
r c C s* | j }t|jdd�}|du rdS ||j�S )z?
Return the package's loader if it's a ResourceReader.
�get_resource_readerN)�__spec__�getattr�loader�name�r �spec�readerr r r
r &