diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-07-13 15:44:43 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-07-13 15:55:40 +0300 |
commit | 585f8fd57a4ab83eca0890f5c05e959b79ef4ea4 (patch) | |
tree | 6714fb98ebef8ae413eaf223e3a7b29cf01cedc6 /contrib/python/ipython/py3/IPython/terminal | |
parent | e12a75707d4c42a0081e951c9142db0bf460d802 (diff) | |
download | ydb-585f8fd57a4ab83eca0890f5c05e959b79ef4ea4.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/terminal')
-rw-r--r-- | contrib/python/ipython/py3/IPython/terminal/interactiveshell.py | 5 | ||||
-rw-r--r-- | contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py b/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py index bdc783c131..40e2c9a669 100644 --- a/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py +++ b/contrib/python/ipython/py3/IPython/terminal/interactiveshell.py @@ -943,6 +943,11 @@ class TerminalInteractiveShell(InteractiveShell): active_eventloop: Optional[str] = None def enable_gui(self, gui: Optional[str] = None) -> None: + if gui: + from ..core.pylabtools import _convert_gui_from_matplotlib + + gui = _convert_gui_from_matplotlib(gui) + if self.simple_prompt is True and gui is not None: print( f'Cannot install event loop hook for "{gui}" when running with `--simple-prompt`.' diff --git a/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py b/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py index d2499e11e6..8f6a7f4965 100644 --- a/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py +++ b/contrib/python/ipython/py3/IPython/terminal/pt_inputhooks/asyncio.py @@ -27,6 +27,7 @@ prompt_toolkit`s `patch_stdout`):: In [4]: asyncio.ensure_future(f()) """ + from prompt_toolkit import __version__ as ptk_version from IPython.core.async_helpers import get_asyncio_loop |