Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/__pycache__/paths.cpython-39.pyc
Ðазад
a o�h� � @ s� d Z ddlZddlZddlmZ ddlZddlmZ ddl m Z mZmZm Z mZmZ ed�dd�Zed�d d �Zed�dd�Zd d� Zddd�ZdS )z/Find files and directories which IPython uses. � N)�warn)�import_item)�get_home_dir�get_xdg_dir�get_xdg_cache_dir� compress_user� _writable_dir�ensure_dir_exists)�returnc C sf t j} t jj}d}t� }t� }d| v r0tdt� | �d| �dd��}|du r�|||�}|r�||d�}t |�r�t }t j�|�r�td�||�||��� n*t j� |�r�td�||�||��� n|}t j�t j�|��}t j�|��rt |��std �|�� t�� }nJt j�|��sNt j�|�}t |��s@td �|�� t�� }nt j|dd� t|t��sbJ d ��|S )z�Get the IPython directory for this platform and user. This uses the logic in `get_home_dir` to find the home directory and then adds .ipython to the end of the path. z.ipythonZIPYTHON_DIRzdThe environment variable IPYTHON_DIR is deprecated since IPython 3.0. Please use IPYTHONDIR instead.Z IPYTHONDIRN�ipythonzDIgnoring {0} in favour of {1}. Remove {0} to get rid of this messagez>{0} is deprecated. Move link to {1} to get rid of this messagezEIPython dir '{0}' is not a writable location, using a temp directory.zHIPython parent '{0}' is not a writable location, using a temp directory.T)�exist_okz:all path manipulation should be str(unicode), but are not.)�os�environ�path�joinr r r �DeprecationWarning�getr r �exists�format�islink�normpath� expanduser�tempfile�mkdtemp�dirname�makedirs� isinstance�str) �env�pjoinZ ipdir_defZhome_dirZxdg_dir�ipdirZ xdg_ipdir�cu�parent� r# �}/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/paths.py�get_ipython_dir sR � ��� � r% c C sR t � } | du rt� S tj�| d�}tj�|�s@t| �r@t|� nt| �sNt� S |S )z;Get the cache directory it is created if it does not exist.Nr )r r% r r r r r r )Zxdgdirr r# r# r$ �get_ipython_cache_dirN s r&