aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
diff options
context:
space:
mode:
authorIvan Blinkov <ivan@blinkov.ru>2022-02-10 16:47:10 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:47:10 +0300
commit1aeb9a455974457866f78722ad98114bafc84e8a (patch)
treee4340eaf1668684d83a0a58c36947c5def5350ad /contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
parentbd5ef432f5cfb1e18851381329d94665a4c22470 (diff)
downloadydb-1aeb9a455974457866f78722ad98114bafc84e8a.tar.gz
Restoring authorship annotation for Ivan Blinkov <ivan@blinkov.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py')
-rw-r--r--contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py270
1 files changed, 135 insertions, 135 deletions
diff --git a/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py b/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
index 072fb0677f..0b06acac47 100644
--- a/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
+++ b/contrib/python/prompt-toolkit/py2/prompt_toolkit/output.py
@@ -1,26 +1,26 @@
-"""
-Interface for an output.
-"""
-from __future__ import unicode_literals
-from abc import ABCMeta, abstractmethod
-from six import with_metaclass
+"""
+Interface for an output.
+"""
+from __future__ import unicode_literals
+from abc import ABCMeta, abstractmethod
+from six import with_metaclass
from prompt_toolkit.layout.screen import Size
-
-__all__ = (
- 'Output',
-)
-
-
-class Output(with_metaclass(ABCMeta, object)):
- """
- Base class defining the output interface for a
- :class:`~prompt_toolkit.renderer.Renderer`.
-
- Actual implementations are
- :class:`~prompt_toolkit.terminal.vt100_output.Vt100_Output` and
- :class:`~prompt_toolkit.terminal.win32_output.Win32Output`.
- """
- @abstractmethod
+
+__all__ = (
+ 'Output',
+)
+
+
+class Output(with_metaclass(ABCMeta, object)):
+ """
+ Base class defining the output interface for a
+ :class:`~prompt_toolkit.renderer.Renderer`.
+
+ Actual implementations are
+ :class:`~prompt_toolkit.terminal.vt100_output.Vt100_Output` and
+ :class:`~prompt_toolkit.terminal.win32_output.Win32Output`.
+ """
+ @abstractmethod
def fileno(self):
" Return the file descriptor to which we can write for the output. "
@@ -34,119 +34,119 @@ class Output(with_metaclass(ABCMeta, object)):
"""
@abstractmethod
- def write(self, data):
- " Write text (Terminal escape sequences will be removed/escaped.) "
-
- @abstractmethod
- def write_raw(self, data):
- " Write text. "
-
- @abstractmethod
- def set_title(self, title):
- " Set terminal title. "
-
- @abstractmethod
- def clear_title(self):
- " Clear title again. (or restore previous title.) "
-
- @abstractmethod
- def flush(self):
- " Write to output stream and flush. "
-
- @abstractmethod
- def erase_screen(self):
- """
- Erases the screen with the background colour and moves the cursor to
- home.
- """
-
- @abstractmethod
- def enter_alternate_screen(self):
- " Go to the alternate screen buffer. (For full screen applications). "
-
- @abstractmethod
- def quit_alternate_screen(self):
- " Leave the alternate screen buffer. "
-
- @abstractmethod
- def enable_mouse_support(self):
- " Enable mouse. "
-
- @abstractmethod
- def disable_mouse_support(self):
- " Disable mouse. "
-
- @abstractmethod
- def erase_end_of_line(self):
- """
- Erases from the current cursor position to the end of the current line.
- """
-
- @abstractmethod
- def erase_down(self):
- """
- Erases the screen from the current line down to the bottom of the
- screen.
- """
-
- @abstractmethod
- def reset_attributes(self):
- " Reset color and styling attributes. "
-
- @abstractmethod
- def set_attributes(self, attrs):
- " Set new color and styling attributes. "
-
- @abstractmethod
- def disable_autowrap(self):
- " Disable auto line wrapping. "
-
- @abstractmethod
- def enable_autowrap(self):
- " Enable auto line wrapping. "
-
- @abstractmethod
- def cursor_goto(self, row=0, column=0):
- " Move cursor position. "
-
- @abstractmethod
- def cursor_up(self, amount):
- " Move cursor `amount` place up. "
-
- @abstractmethod
- def cursor_down(self, amount):
- " Move cursor `amount` place down. "
-
- @abstractmethod
- def cursor_forward(self, amount):
- " Move cursor `amount` place forward. "
-
- @abstractmethod
- def cursor_backward(self, amount):
- " Move cursor `amount` place backward. "
-
- @abstractmethod
- def hide_cursor(self):
- " Hide cursor. "
-
- @abstractmethod
- def show_cursor(self):
- " Show cursor. "
-
- def ask_for_cpr(self):
- """
- Asks for a cursor position report (CPR).
- (VT100 only.)
- """
-
- def bell(self):
- " Sound bell. "
-
- def enable_bracketed_paste(self):
- " For vt100 only. "
-
- def disable_bracketed_paste(self):
- " For vt100 only. "
+ def write(self, data):
+ " Write text (Terminal escape sequences will be removed/escaped.) "
+
+ @abstractmethod
+ def write_raw(self, data):
+ " Write text. "
+
+ @abstractmethod
+ def set_title(self, title):
+ " Set terminal title. "
+
+ @abstractmethod
+ def clear_title(self):
+ " Clear title again. (or restore previous title.) "
+
+ @abstractmethod
+ def flush(self):
+ " Write to output stream and flush. "
+
+ @abstractmethod
+ def erase_screen(self):
+ """
+ Erases the screen with the background colour and moves the cursor to
+ home.
+ """
+
+ @abstractmethod
+ def enter_alternate_screen(self):
+ " Go to the alternate screen buffer. (For full screen applications). "
+
+ @abstractmethod
+ def quit_alternate_screen(self):
+ " Leave the alternate screen buffer. "
+
+ @abstractmethod
+ def enable_mouse_support(self):
+ " Enable mouse. "
+
+ @abstractmethod
+ def disable_mouse_support(self):
+ " Disable mouse. "
+
+ @abstractmethod
+ def erase_end_of_line(self):
+ """
+ Erases from the current cursor position to the end of the current line.
+ """
+
+ @abstractmethod
+ def erase_down(self):
+ """
+ Erases the screen from the current line down to the bottom of the
+ screen.
+ """
+
+ @abstractmethod
+ def reset_attributes(self):
+ " Reset color and styling attributes. "
+
+ @abstractmethod
+ def set_attributes(self, attrs):
+ " Set new color and styling attributes. "
+
+ @abstractmethod
+ def disable_autowrap(self):
+ " Disable auto line wrapping. "
+
+ @abstractmethod
+ def enable_autowrap(self):
+ " Enable auto line wrapping. "
+
+ @abstractmethod
+ def cursor_goto(self, row=0, column=0):
+ " Move cursor position. "
+
+ @abstractmethod
+ def cursor_up(self, amount):
+ " Move cursor `amount` place up. "
+
+ @abstractmethod
+ def cursor_down(self, amount):
+ " Move cursor `amount` place down. "
+
+ @abstractmethod
+ def cursor_forward(self, amount):
+ " Move cursor `amount` place forward. "
+
+ @abstractmethod
+ def cursor_backward(self, amount):
+ " Move cursor `amount` place backward. "
+
+ @abstractmethod
+ def hide_cursor(self):
+ " Hide cursor. "
+
+ @abstractmethod
+ def show_cursor(self):
+ " Show cursor. "
+
+ def ask_for_cpr(self):
+ """
+ Asks for a cursor position report (CPR).
+ (VT100 only.)
+ """
+
+ def bell(self):
+ " Sound bell. "
+
+ def enable_bracketed_paste(self):
+ " For vt100 only. "
+
+ def disable_bracketed_paste(self):
+ " For vt100 only. "
class DummyOutput(Output):