Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/prompt_toolkit/application/__pycache__/application.cpython-39.pyc
Ðазад
a d�hF� � @ sB d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dlm Z mZmZm Z mZmZ d dlmZmZ d dlmZ d dlmZ d dlmZmZmZmZmZmZmZmZm Z m!Z!m"Z" d dl#m$Z$ d d l%m&Z& d d l'm(Z(m)Z) d dl*m+Z+m,Z, d dl-m.Z. d d l/m0Z0 d dl1m2Z2m3Z3m4Z4m5Z5 d dl6m7Z7 d dl8m9Z9m:Z:m;Z;m<Z< d dl=m>Z> d dl?m@Z@ d dlAmBZBmCZC d dlDmEZE d dlFmGZG d dlHmIZI d dlJmKZKmLZLmMZMmNZNmOZOmPZPmQZQ d dlRmSZSmTZT d dlUmVZV d dlWmXZX d dlYmZZZm[Z[ d dl\m]Z]m^Z^ d dl_m`Z` d dlambZbmcZc d dldmeZemfZf d d lgmhZhmiZi d d!ljmkZk d d"llmmZmmnZnmoZompZpmqZqmrZrmsZsmtZt d d#lumvZvmwZw d$d%lxmyZymzZz d$d&l{m|Z|m{Z{ d'gZ}eSZ~e d(�Zed)gdf Z�e�ed*d�Z�e�ed+d�Z�G d,d'� d'ee �Z�G d-d.� d.eO�Z�d/d0d1�d2d3�Z�ed4d5d6�d7d8��Z�ed5d9�d:d;��Z�dS )<� )�annotationsN)�AbstractEventLoop�Future�Task� ensure_future�get_running_loop�sleep)� ExitStack�contextmanager)�Popen)� format_tb)�Any�Callable� Coroutine� Generator�Generic�Hashable�Iterable�Iterator�TypeVar�cast�overload)�Buffer)�SimpleCache)� Clipboard�InMemoryClipboard)�AnyCursorShapeConfig�to_cursor_shape_config)�Size)�EditingMode)� InputHook�get_traceback_from_context�new_eventloop_with_inputhook�run_in_executor_with_context)�call_soon_threadsafe)� Condition�Filter�FilterOrBool� to_filter)�AnyFormattedText)�Input)� get_typeahead�store_typeahead)�load_page_navigation_bindings)�load_key_bindings)� EmacsState)�Binding�ConditionalKeyBindings�GlobalOnlyKeyBindings�KeyBindings�KeyBindingsBase� KeysTuple�merge_key_bindings)� KeyPressEvent�KeyProcessor)�ViState)�Keys)� Container�Window)� BufferControl� UIControl)�create_dummy_layout)�Layout�walk)� ColorDepth�Output)�Renderer�print_formatted_text)�SearchState)� BaseStyle� DummyStyle�DummyStyleTransformation�DynamicStyle�StyleTransformation�default_pygments_style�default_ui_style�merge_styles)�Event�in_main_thread� )�get_app_session�set_app)�in_terminal�run_in_terminal�Application� _AppResult�Application[_AppResult]�SIGWINCH�SIGTSTPc @ s� e Zd ZdZdddddddddddejdddddddddddddfddd d ddd dd dd dd d ddddddddddddd�dd�Zddd�dd�Zed d!�d"d#��Z ed$d!�d%d&��Z ed'd!�d(d)��Zdd!�d*d+�Zdd!�d,d-�Z ed d!�d.d/��Zd�d dd0�d1d2�Zdd!�d3d4�Zdd!�d5d6�Zd7dd8�d9d:�Zdd!�d;d<�Zd�d=dd>�d?d@�Zd�d=d d dAdBdC�dDdE�Zd�d=d d d dFdBdG�dHdI�ZdJdKddL�dMdN�ZedOd!�dPdQ��Zd7d7ddR�dSdT�ZdUdVdW�dXdY�ZdVddZ�d[d\�Zdd!�d]d^�Zdd!�d_d`�Zdd!�dadb�Ze dd!�dcdd��Z!e dedf�dBdgddh�didd��Z!e dedf�djdgddk�dldd��Z!d�dmdndgddo�dpdd�Z!dd!�dqdr�Z"d�dgd dtdgddu�dvdw�Z#d�d ddx�dydz�Z$d�dtddd{�d|d}�Z%ed d!�d~d��Z&ed d!�d�d���Z'd�d!�d�d��Z(dS )�rV a' The main Application class! This glues everything together. :param layout: A :class:`~prompt_toolkit.layout.Layout` instance. :param key_bindings: :class:`~prompt_toolkit.key_binding.KeyBindingsBase` instance for the key bindings. :param clipboard: :class:`~prompt_toolkit.clipboard.Clipboard` to use. :param full_screen: When True, run the application on the alternate screen buffer. :param color_depth: Any :class:`~.ColorDepth` value, a callable that returns a :class:`~.ColorDepth` or `None` for default. :param erase_when_done: (bool) Clear the application output when it finishes. :param reverse_vi_search_direction: Normally, in Vi mode, a '/' searches forward and a '?' searches backward. In Readline mode, this is usually reversed. :param min_redraw_interval: Number of seconds to wait between redraws. Use this for applications where `invalidate` is called a lot. This could cause a lot of terminal output, which some terminals are not able to process. `None` means that every `invalidate` will be scheduled right away (which is usually fine). When one `invalidate` is called, but a scheduled redraw of a previous `invalidate` call has not been executed yet, nothing will happen in any case. :param max_render_postpone_time: When there is high CPU (a lot of other scheduled calls), postpone the rendering max x seconds. '0' means: don't postpone. '.5' means: try to draw at least twice a second. :param refresh_interval: Automatically invalidate the UI every so many seconds. When `None` (the default), only invalidate when `invalidate` has been called. :param terminal_size_polling_interval: Poll the terminal size every so many seconds. Useful if the applications runs in a thread other then then main thread where SIGWINCH can't be handled, or on Windows. Filters: :param mouse_support: (:class:`~prompt_toolkit.filters.Filter` or boolean). When True, enable mouse support. :param paste_mode: :class:`~prompt_toolkit.filters.Filter` or boolean. :param editing_mode: :class:`~prompt_toolkit.enums.EditingMode`. :param enable_page_navigation_bindings: When `True`, enable the page navigation key bindings. These include both Emacs and Vi bindings like page-up, page-down and so on to scroll through pages. Mostly useful for creating an editor or other full screen applications. Probably, you don't want this for the implementation of a REPL. By default, this is enabled if `full_screen` is set. Callbacks (all of these should accept an :class:`~prompt_toolkit.application.Application` object as input.) :param on_reset: Called during reset. :param on_invalidate: Called when the UI has been invalidated. :param before_render: Called right before rendering. :param after_render: Called right after rendering. I/O: (Note that the preferred way to change the input/output is by creating an `AppSession` with the required input/output objects. If you need multiple applications running at the same time, you have to create a separate `AppSession` using a `with create_app_session():` block. :param input: :class:`~prompt_toolkit.input.Input` instance. :param output: :class:`~prompt_toolkit.output.Output` instance. (Probably Vt100_Output or Win32Output.) Usage: app = Application(...) app.run() # Or await app.run_async() NTFg{�G�z�?� �?z Layout | NonezBaseStyle | Noner'