##// END OF EJS Templates
Explicitly close prompt_toolkit event loop after running...
Thomas Kluyver -
Show More
@@ -251,8 +251,8 b' class TerminalInteractiveShell(InteractiveShell):'
251 mouse_support=self.mouse_support,
251 mouse_support=self.mouse_support,
252 **self._layout_options()
252 **self._layout_options()
253 )
253 )
254 self.pt_cli = CommandLineInterface(self._app,
254 self._eventloop = create_eventloop(self.inputhook)
255 eventloop=create_eventloop(self.inputhook))
255 self.pt_cli = CommandLineInterface(self._app, eventloop=self._eventloop)
256
256
257 def _make_style_from_name(self, name):
257 def _make_style_from_name(self, name):
258 """
258 """
@@ -383,6 +383,8 b' class TerminalInteractiveShell(InteractiveShell):'
383 except KeyboardInterrupt:
383 except KeyboardInterrupt:
384 print("\nKeyboardInterrupt escaped interact()\n")
384 print("\nKeyboardInterrupt escaped interact()\n")
385
385
386 self._eventloop.close()
387
386 _inputhook = None
388 _inputhook = None
387 def inputhook(self, context):
389 def inputhook(self, context):
388 if self._inputhook is not None:
390 if self._inputhook is not None:
General Comments 0
You need to be logged in to leave comments. Login now