Show More
@@ -712,6 +712,8 b' class TerminalInteractiveShell(InteractiveShell):' | |||||
712 | active_eventloop = None |
|
712 | active_eventloop = None | |
713 | def enable_gui(self, gui=None): |
|
713 | def enable_gui(self, gui=None): | |
714 | print(f'Someone called `enable_gui` with {gui=}.') |
|
714 | print(f'Someone called `enable_gui` with {gui=}.') | |
|
715 | if self._inputhook is not None and gui is not None: | |||
|
716 | raise RuntimeError("Shell already running a gui event loop.") | |||
715 | if gui and (gui not in {"inline", "webagg"}): |
|
717 | if gui and (gui not in {"inline", "webagg"}): | |
716 | # This hook runs with each cycle of the `prompt_toolkit`'s event loop. |
|
718 | # This hook runs with each cycle of the `prompt_toolkit`'s event loop. | |
717 | self.active_eventloop, self._inputhook = get_inputhook_name_and_func(gui) |
|
719 | self.active_eventloop, self._inputhook = get_inputhook_name_and_func(gui) |
General Comments 0
You need to be logged in to leave comments.
Login now