Show More
@@ -38,6 +38,10 b' class PTInteractiveShell(InteractiveShell):' | |||||
38 | else: |
|
38 | else: | |
39 | b.insert_text('\n' + (' ' * (indent or 0))) |
|
39 | b.insert_text('\n' + (' ' * (indent or 0))) | |
40 |
|
40 | |||
|
41 | @kbmanager.registry.add_binding(Keys.ControlC) | |||
|
42 | def _(event): | |||
|
43 | event.current_buffer.reset() | |||
|
44 | ||||
41 | # Pre-populate history from IPython's history database |
|
45 | # Pre-populate history from IPython's history database | |
42 | history = InMemoryHistory() |
|
46 | history = InMemoryHistory() | |
43 | last_cell = u"" |
|
47 | last_cell = u"" | |
@@ -67,7 +71,13 b' class PTInteractiveShell(InteractiveShell):' | |||||
67 |
|
71 | |||
68 | def interact(self): |
|
72 | def interact(self): | |
69 | while self.keep_running: |
|
73 | while self.keep_running: | |
|
74 | try: | |||
70 | document = self.pt_cli.run() |
|
75 | document = self.pt_cli.run() | |
|
76 | except EOFError: | |||
|
77 | if self.ask_yes_no('Do you really want to exit ([y]/n)?','y','n'): | |||
|
78 | self.ask_exit() | |||
|
79 | ||||
|
80 | else: | |||
71 | if document: |
|
81 | if document: | |
72 | self.run_cell(document.text, store_history=True) |
|
82 | self.run_cell(document.text, store_history=True) | |
73 |
|
83 |
General Comments 0
You need to be logged in to leave comments.
Login now