/usr/lib/python3.10/importlib/__pycache__
Edit: /usr/lib/python3.10/importlib/__pycache__/_common.cpython-310.pyc (2967B)
o
9j @ 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 jdddZejdd Zeejejdd Z dS ) N)UnionAnyOptional )ResourceReaderTraversable) wrap_specc C s t t| S )z3
Get a Traversable resource from a package
)from_packageget_package)package r (/usr/lib/python3.10/importlib/_common.pyfiles s r c C s. t | }tj|\}}|rt| d|S )zNormalize 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)strospathsplit
ValueError)r str_pathparent file_namer r r
normalize_path s
r c C s* | j }t|jdd}|du rdS ||jS )z?
Return the package's loader if it's a ResourceReader.
get_resource_readerN)__spec__getattrloadernamer specreaderr r r
r &