Show More
@@ -91,21 +91,19 b' def create_inputhook_qt4(mgr, app=None):' | |||||
91 | timer.start(50) |
|
91 | timer.start(50) | |
92 | app.exec_() |
|
92 | app.exec_() | |
93 | timer.stop() |
|
93 | timer.stop() | |
94 | ignore_CTRL_C() |
|
|||
95 | except KeyboardInterrupt: |
|
94 | except KeyboardInterrupt: | |
96 | ignore_CTRL_C() |
|
95 | ignore_CTRL_C() | |
97 | got_kbdint[0] = True |
|
96 | got_kbdint[0] = True | |
98 |
print("\nKeyboardInterrupt - |
|
97 | print("\nKeyboardInterrupt - Ctrl-C again for new prompt") | |
99 | "\n * hit CTRL+C again to clear the prompt" |
|
|||
100 | "\n * use '%gui none' to disable the event loop" |
|
|||
101 | " permanently" |
|
|||
102 | "\n and '%gui qt4' to re-enable it later") |
|
|||
103 | mgr.clear_inputhook() |
|
98 | mgr.clear_inputhook() | |
104 | except: # NO exceptions are allowed to escape from a ctypes callback |
|
99 | except: # NO exceptions are allowed to escape from a ctypes callback | |
|
100 | ignore_CTRL_C() | |||
105 | mgr.clear_inputhook() |
|
101 | mgr.clear_inputhook() | |
106 | from traceback import print_exc |
|
102 | from traceback import print_exc | |
107 | print_exc() |
|
103 | print_exc() | |
108 | print("Got exception from inputhook_qt4, unregistering.") |
|
104 | print("Got exception from inputhook_qt4, unregistering.") | |
|
105 | finally: | |||
|
106 | allow_CTRL_C() | |||
109 | return 0 |
|
107 | return 0 | |
110 |
|
108 | |||
111 | def preprompthook_qt4(ishell): |
|
109 | def preprompthook_qt4(ishell): |
General Comments 0
You need to be logged in to leave comments.
Login now