Show More
@@ -16,6 +16,11 b' Author: Christian Boos' | |||
|
16 | 16 | # Imports |
|
17 | 17 | #----------------------------------------------------------------------------- |
|
18 | 18 | |
|
19 | import os | |
|
20 | import signal | |
|
21 | import time | |
|
22 | import threading | |
|
23 | ||
|
19 | 24 | from IPython.core.interactiveshell import InteractiveShell |
|
20 | 25 | from IPython.external.qt_for_kernel import QtCore, QtGui |
|
21 | 26 | from IPython.lib.inputhook import allow_CTRL_C, ignore_CTRL_C, stdin_ready |
@@ -117,13 +122,12 b' def create_inputhook_qt4(mgr, app=None):' | |||
|
117 | 122 | ignore_CTRL_C() |
|
118 | 123 | got_kbdint[0] = True |
|
119 | 124 | mgr.clear_inputhook() |
|
120 | import os, signal, time, threading | |
|
121 | 125 | if(os.name == 'posix'): |
|
122 | 126 | pid = os.getpid() |
|
123 | 127 | print("^C") |
|
124 | 128 | thread = threading.Thread( |
|
125 | 129 | target = lambda: |
|
126 | ( time.sleep(.1), | |
|
130 | ( time.sleep(.01), | |
|
127 | 131 | os.kill(pid, signal.SIGINT) ) |
|
128 | 132 | ) |
|
129 | 133 |
General Comments 0
You need to be logged in to leave comments.
Login now