관리-도구
편집 파일: _common.cpython-311.pyc
� �������&�vY���������������������X����d�dl�Z�d�dlZd�dlZd�dlZd�dlZd�dlZd�dlZd�dlmZm Z �ddl mZmZ�ddl mZ�eej��������ef���������Zd��Zd��Zd��Zd ��Zd ��Zej��������de�j��������d�d ���������������Zej��������d����������������Ze���������������������ej��������������������ej��������d������������������������������ZdS�)�����N)�Union�Optional����)�ResourceReader�Traversable)� wrap_specc������������������:�����t����������t����������|�������������������������S�)z3 Get a Traversable resource from a package )�from_package�get_package)�packages��� �B/opt/alt/python311/lib64/python3.11/importlib/resources/_common.py�filesr������s������ ���G�,�,�-�-�-�����c������������������d�����|�j���������}t����������|j��������dd������������}|�dS��||j��������������������S�)z? Return the package's loader if it's a ResourceReader. �get_resource_readerN)�__spec__�getattr�loader�name�r����spec�readers��� r ���r���r������s<���������D� �T�[�"7�� >� >�F� �~��t��6�$�)���r���c������������������b�����t����������|�t����������j��������������������r|�nt����������j��������|�������������S�)N)� isinstance�types� ModuleType� importlib� import_module)�cands��� r ����resolver ���*���s*�������d�E�$4�5�5�X�4�4�9�;R�SW�;X�;X�Xr���c������������������p�����t����������|�������������}t����������|������������j���������t����������|��d��������������|S�)z�Take a package name or module object and return the module. Raise an exception if the resolved module is not a package. Nz is not a package)r ���r����submodule_search_locations� TypeError)r����resolveds��� r ���r���r���/���s>��������w���H�����5�=��7�7�7�7�8�8�8��Or���c�����������������������t����������|�������������}|j�����������������������������|j��������������������}|�����������������������������������S�)z= Return a Traversable object for the given package. )r���r���r���r���r���r���s��� r ���r ���r ���;���s6������ ��W���D� �[� ,� ,�T�Y� 7� 7�F��<�<�>�>�r�����)� _os_removec�������������#����~��K����t����������j��������|�������������\��}} � �t����������j��������|�|����������������������������t����������j��������|�������������n#�t����������j��������|�������������w�xY�w~�t����������j��������|������������V��� ��||�������������d�S�#�t����������$�r�Y�d�S�w�xY�w#� ��||�������������w�#�t����������$�r�Y�w�w�xY�wxY�w)N��suffix)�tempfile�mkstemp�os�write�close�pathlib�Path�FileNotFoundError)r���r*���r'����fd�raw_paths��� r ���� _tempfiler5���E���s�������������#�6�2�2�2�L�B��� ��H�R�����"�"�"��H�R�L�L�L�L��B�H�R�L�L�L�L������l�8�$�$�$�$�$� ��J�x� � � � � �� �� �� �� ��D�D� ����� ��J�x� � � � �� �� �� �� ��D� ������sR����A��B��A%�%B���B �� B�B�B<� B,�+B<�, B9�6B<�8B9�9B<c������������������8�����t����������|�j��������|�j���������������������S�)zu Given a Traversable object, return that object as a path on the local file system in a context manager. r)���)r5���� read_bytesr�����paths��� r ����as_filer:���\���s��������T�_�T�Y�7�7�7�7r���c��������������#�������K����|�V���dS�)z7 Degenerate behavior for pathlib.Path objects. N��r8���s��� r ����_r=���e���s������������J�J�J�J�Jr���)r&���)r-���r0���r+���� functools� contextlibr���r����typingr���r����abcr���r���� _adaptersr���r����str�Packager���r���r ���r���r ����contextmanager�remover5����singledispatchr:����registerr1���r=���r<���r���r ����<module>rI������s������ � � � �����������������������������������������"��"��"��"��"��"��"��"��,��,��,��,��,��,��,��,�� �� �� �� �� �� � �� �#�%� &��.��.��.������"Y��Y��Y� �� �� ������������I������������,���8��8����8�� ���'�,������������ ������r���