Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/IPython/terminal/pt_inputhooks/__pycache__/wx.cpython-39.pyc
Ðазад
a o�h� � @ s� d Z ddlZddlZddlZddlmZ ddlZdd� Zedd� �Z G dd � d ej �ZG d d� de�Z edd � �Zedd� �Zedd� �ZdZzeejd �ZW n ey� Y n0 edkr�eZnejdkr�eZneZdS )z;Enable wxPython to be used interactively in prompt_toolkit � N)� default_timerc s � fdd�}|S )aC Decorator which causes KeyboardInterrupt exceptions to be ignored during execution of the decorated function. This is used by the inputhook functions to handle the event where the user presses CTRL+C while IPython is idle, and the inputhook loop is running. In this case, we want to ignore interrupts. c s* z� | i |�� W n t y$ Y n0 d S �N)�KeyboardInterrupt)�args�kwargs��func� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/IPython/terminal/pt_inputhooks/wx.py�wrapper s z*ignore_keyboardinterrupts.<locals>.wrapperr )r r r r r �ignore_keyboardinterrupts s r c C sN t �� }|durJt �� sJ �t �� }t �|�}|�� r@|�� q.|�� ~dS )z�Run the wx event loop by processing pending events only. This approach seems to work, but its performance is not great as it relies on having PyOS_InputHook called regularly. Nr )�wx�GetApp� Thread_IsMain� EventLoop�EventLoopActivator�Pending�Dispatch�ProcessIdle)�context�app�evtloop�ear r r � inputhook_wx1 s r c @ s e Zd Zdd� Zdd� ZdS )�EventLoopTimerc C s || _ tj�| � d S r )r r �Timer�__init__)�selfr r r r r 4 s zEventLoopTimer.__init__c C s | � � d S r r �r r r r �Notify8 s zEventLoopTimer.NotifyN)�__name__� __module__�__qualname__r r r r r r r 2 s r c @ s e Zd Zdd� Zdd� ZdS )�EventLoopRunnerc C s6 || _ t�� | _t| j�| _| j�|� | j�� d S r ) �input_is_readyr r r r �check_stdin�timer�Start�Run)r �timer$ r r r r( >