Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/testing/__pycache__/tools.cpython-39.pyc
Ðазад
a o�h7 � @ s� d Z ddlZddlmZ ddlZddlZddlZddlZddlm Z ddl mZ ddlm Z mZ ddlmZ ddlmZ dd lmZ dd lmZ ddlmZmZ ddlmZ d dlmZ d dlmZ ej dkr�ej!nej"Z#e#dd� �Z$dd� Z%de%_&dd� Z'dd� Z(d7dd�Z)d8dd�Z*d9d d!�Z+G d"d#� d#ej,�Z-d$Z.d%d&� Z/eZ0e1e�2d��Z3d'Z4G d(d)� d)e5�Z6d*Z7G d+d,� d,e6�Z8e d-d.� �Z9e d/d0� �Z:d1d2� Z;d:d3d4�Z<d;d5d6�Z=dS )<zWGeneric testing tools. Authors ------- - Fernando Perez <Fernando.Perez@berkeley.edu> � N)�Path)�contextmanager)�StringIO)�Popen�PIPE)�patch)�Config)�get_output_error_code)�list_strings)�temp_pyfile�Tee)� py3compat� )� decorators)�skipdoctest�win32c s* t |�}tj�| �d � � fdd�|D �S )aP Make full paths for all the listed files, based on startPath. Only the base part of startPath is kept, since this routine is typically used with a script's ``__file__`` variable as startPath. The base of startPath is then prepended to all the listed files, forming the output list. Parameters ---------- startPath : string Initial path to use as the base for the results. This path is split using os.path.split() and only its first component is kept. files : string or list One or more files. Examples -------- >>> full_path('/foo/bar.py',['a.txt','b.txt']) ['/foo/a.txt', '/foo/b.txt'] >>> full_path('/foo',['a.txt','b.txt']) ['/a.txt', '/b.txt'] If a single file is given, the output is still a list:: >>> full_path('/foo','a.txt') ['/a.txt'] r c s g | ]}t j�� |��qS � )�os�path�join)�.0�f��baser ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/testing/tools.py� <listcomp>H � zfull_path.<locals>.<listcomp>)r r r �split)Z startPath�filesr r r � full_path&