Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/core/magics/__pycache__/osm.cpython-39.pyc
Ðазад
a o�h�w � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddlm Z ddlmZ ddlm Z mZ ddlmZ dd lmZmZmZmZmZmZ dd lmZ ddlmZ ddlmZ dd lmZ ddl m!Z! ddl"m#Z# eG dd� de��Z$dS )z�Implementation of magic functions for interaction with the OS. Note: this module is named 'osm' instead of 'os' to avoid a collision with the builtin. � N)�pformat)�magic_arguments)�oinspect)�page)� AliasError�Alias)� UsageError)�Magics�compress_dhist�magics_class� line_magic� cell_magic�line_cell_magic)�skip_doctest)�source_to_unicode)� abbrev_cwd)�set_term_title)�Bool)�warnc s~ e Zd ZdZeddd�jdd�Zd;� fdd � Zd d� Zdd � Z dd� Z eed<dd���Z ed=dd��Zed>dd��Zeed?dd���Zeed@dd���ZedAdd��Zedd� �ZedBdd ��ZedCd!d"��ZedDd#d$��ZedEd%d&��ZeedFd'd(���ZedGd)d*��Zed+�e�Zed,�e�ZedHd-d.��ZedId/d0��Ze � � e j!d1d2d3dd4d5�e j!d6e"d7d8�ed9d:� ����Z#� Z$S )J�OSMagicszJMagics to interact with the underlying OS (shell-type functionality). Fz5Force %cd magic to be quiet even if -q is not passed.)�helpT)�configNc s� d| _ d | _tjdkrd| _ n�ztjd �dd��dd�}W n tyR d }Y n0 zt�d | tj �| _W n4 tj y� td� d }t�d | tj �| _Y n0 t� j f d|i|�� d S ) NF�posixT�pathext�;�|�.� zexe|com|bat|pyz(.*)\.(%s)$z�Seems like your pathext environmental variable is malformed. Please check it to enable a proper handle of file extensions managed for your system�shell)�is_posix�execre�os�name�environ�replace�KeyError�re�compile� IGNORECASE�errorr �super�__init__)�selfr �kwargsZwinext�� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/core/magics/osm.pyr+ ) s zOSMagics.__init__c C s t �|jt j�r|�� S dS )z7 Test for executable on a POSIX system F)r! �access�path�X_OK�is_file�r, �filer0 r0 r1 � _isexec_POSIXC s zOSMagics._isexec_POSIXc C s |� � o| j�|j�duS �z> Test for executable file on non POSIX system N)r5 r �matchr"