Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/lib/__pycache__/editorhooks.cpython-39.pyc
Ðазад
a o�h� � @ s� d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m Z ddd�Zd d d �Zd!dd�Z d"dd�Zd#dd�Zd$dd�Zd%dd�Zd&dd�Zd'dd�Zd(dd�Zd)dd�ZdS )*z� 'editor' hooks for common editors that work well with ipython They should honor the line number argument, at least. Contributions are *very* welcome. � N)�get_ipython)�TryNext)� py3compatFc s* d� �fdd� }t � �d|� � t � _dS )ay Installs the editor that is called by IPython for the %edit magic. This overrides the default editor, which is generally set by your EDITOR environment variable or is notepad (windows) or vi (linux). By supplying a template string `run_template`, you can control how the editor is invoked by IPython -- (e.g. the format in which it accepts command line options) Parameters ---------- template : basestring run_template acts as a template for how your editor is invoked by the shell. It should contain '{filename}', which will be replaced on invocation with the file name, and '{line}', $line by line number (or 0) to invoke the file with. wait : bool If `wait` is true, wait until the user presses enter before returning, to facilitate non-blocking editors that exit immediately after the call. r c sr |d u rd}� j t�|�|d�}td|� tj�d�r@t�|�}tj |dd�}|� � dkr`t� ��rnt� d� d S )Nr )�filename�line�>�winT)�shellzPress Enter when done editing:)�format�shlex�quote�print�sys�platform� startswith�split� subprocess�Popen�waitr r �input)�selfr r �cmd�proc��templater � ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/lib/editorhooks.py�call_editor. s z#install_editor.<locals>.call_editor�editorN)r )r Zset_hookr )r r r r r r �install_editor s r �komodoc C s t | d dd� dS )z Activestate Komodo [Edit] z -l {line} {filename}T)r N�r ��exer r r r B s �scitec C s t | d � dS )z SciTE or Sc1 z {filename} -goto:{line}Nr! r"