Show More
@@ -86,7 +86,6 b" def execute(code='', kc=None, **kwargs):" | |||
|
86 | 86 | def start_global_kernel(): |
|
87 | 87 | """start the global kernel (if it isn't running) and return its client""" |
|
88 | 88 | global KM, KC |
|
89 | print KM, KC | |
|
90 | 89 | if KM is None: |
|
91 | 90 | KM, KC = start_new_kernel() |
|
92 | 91 | atexit.register(stop_global_kernel) |
@@ -138,7 +137,7 b' def new_kernel():' | |||
|
138 | 137 | yield kc |
|
139 | 138 | finally: |
|
140 | 139 | kc.stop_channels() |
|
141 | km.shutdown_kernel() | |
|
140 | km.shutdown_kernel(now=True) | |
|
142 | 141 | |
|
143 | 142 | |
|
144 | 143 | def assemble_output(iopub): |
@@ -154,9 +153,9 b' def assemble_output(iopub):' | |||
|
154 | 153 | break |
|
155 | 154 | elif msg['msg_type'] == 'stream': |
|
156 | 155 | if content['name'] == 'stdout': |
|
157 |
stdout = |
|
|
156 | stdout += content['data'] | |
|
158 | 157 | elif content['name'] == 'stderr': |
|
159 |
stderr = |
|
|
158 | stderr += content['data'] | |
|
160 | 159 | else: |
|
161 | 160 | raise KeyError("bad stream: %r" % content['name']) |
|
162 | 161 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now