Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions IPython/lib/inputhookqt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,19 @@ def inputhook_qt4():
timer.start(50)
app.exec_()
timer.stop()
ignore_CTRL_C()
except KeyboardInterrupt:
ignore_CTRL_C()
got_kbdint[0] = True
print("\nKeyboardInterrupt - qt4 event loop interrupted!"
"\n * hit CTRL+C again to clear the prompt"
"\n * use '%gui none' to disable the event loop"
" permanently"
"\n and '%gui qt4' to re-enable it later")
print("\nKeyboardInterrupt - Ctrl-C again for new prompt")
mgr.clear_inputhook()
except: # NO exceptions are allowed to escape from a ctypes callback
ignore_CTRL_C()
mgr.clear_inputhook()
from traceback import print_exc
print_exc()
print("Got exception from inputhook_qt4, unregistering.")
finally:
allow_CTRL_C()
return 0

def preprompthook_qt4(ishell):
Expand Down