Show More
@@ -253,8 +253,8 b' class TerminalInteractiveShell(InteractiveShell):' | |||||
253 | mouse_support=self.mouse_support, |
|
253 | mouse_support=self.mouse_support, | |
254 | **self._layout_options() |
|
254 | **self._layout_options() | |
255 | ) |
|
255 | ) | |
256 | self.pt_cli = CommandLineInterface(self._app, |
|
256 | self._eventloop = create_eventloop(self.inputhook) | |
257 | eventloop=create_eventloop(self.inputhook)) |
|
257 | self.pt_cli = CommandLineInterface(self._app, eventloop=self._eventloop) | |
258 |
|
258 | |||
259 | def _make_style_from_name(self, name): |
|
259 | def _make_style_from_name(self, name): | |
260 | """ |
|
260 | """ | |
@@ -384,6 +384,9 b' class TerminalInteractiveShell(InteractiveShell):' | |||||
384 | break |
|
384 | break | |
385 | except KeyboardInterrupt: |
|
385 | except KeyboardInterrupt: | |
386 | print("\nKeyboardInterrupt escaped interact()\n") |
|
386 | print("\nKeyboardInterrupt escaped interact()\n") | |
|
387 | ||||
|
388 | if hasattr(self, '_eventloop'): | |||
|
389 | self._eventloop.close() | |||
387 |
|
390 | |||
388 | _inputhook = None |
|
391 | _inputhook = None | |
389 | def inputhook(self, context): |
|
392 | def inputhook(self, context): |
General Comments 0
You need to be logged in to leave comments.
Login now