Show More
@@ -116,8 +116,22 b' def create_inputhook_qt4(mgr, app=None):' | |||
|
116 | 116 | except KeyboardInterrupt: |
|
117 | 117 | ignore_CTRL_C() |
|
118 | 118 | got_kbdint[0] = True |
|
119 | print("\nKeyboardInterrupt - Ctrl-C again for new prompt") | |
|
120 | 119 | mgr.clear_inputhook() |
|
120 | import os, signal, time, threading | |
|
121 | if(os.name == 'posix'): | |
|
122 | pid = os.getpid() | |
|
123 | print("^C") | |
|
124 | thread = threading.Thread( | |
|
125 | target = lambda: | |
|
126 | ( time.sleep(.1), | |
|
127 | os.kill(pid, signal.SIGINT) ) | |
|
128 | ) | |
|
129 | ||
|
130 | thread.start() | |
|
131 | else: | |
|
132 | print("\nKeyboardInterrupt - Ctrl-C again for new prompt") | |
|
133 | ||
|
134 | ||
|
121 | 135 | except: # NO exceptions are allowed to escape from a ctypes callback |
|
122 | 136 | ignore_CTRL_C() |
|
123 | 137 | from traceback import print_exc |
General Comments 0
You need to be logged in to leave comments.
Login now