Show More
@@ -196,6 +196,16 b' class PTInteractiveShell(InteractiveShell):' | |||||
196 | if document: |
|
196 | if document: | |
197 | self.run_cell(document.text, store_history=True) |
|
197 | self.run_cell(document.text, store_history=True) | |
198 |
|
198 | |||
|
199 | def mainloop(self): | |||
|
200 | # An extra layer of protection in case someone mashing Ctrl-C breaks | |||
|
201 | # out of our internal code. | |||
|
202 | while True: | |||
|
203 | try: | |||
|
204 | self.interact() | |||
|
205 | break | |||
|
206 | except KeyboardInterrupt: | |||
|
207 | print("\nKeyboardInterrupt escaped interact()\n") | |||
|
208 | ||||
199 | _inputhook = None |
|
209 | _inputhook = None | |
200 | def inputhook(self, context): |
|
210 | def inputhook(self, context): | |
201 | if self._inputhook is not None: |
|
211 | if self._inputhook is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now