Show More
@@ -64,7 +64,7 b' var IPython = (function (IPython) {' | |||
|
64 | 64 | |
|
65 | 65 | |
|
66 | 66 | Kernel.prototype.restart = function () { |
|
67 |
$([IPython.events]).trigger( |
|
|
67 | $([IPython.events]).trigger('status_restarting.Kernel', {kernel: this}); | |
|
68 | 68 | var that = this; |
|
69 | 69 | if (this.running) { |
|
70 | 70 | this.stop_channels(); |
@@ -86,6 +86,7 b' var IPython = (function (IPython) {' | |||
|
86 | 86 | this.start_channels(); |
|
87 | 87 | this.shell_channel.onmessage = $.proxy(this._handle_shell_reply,this); |
|
88 | 88 | this.iopub_channel.onmessage = $.proxy(this._handle_iopub_reply,this); |
|
89 | $([IPython.events]).trigger('status_started.Kernel', {kernel: this}); | |
|
89 | 90 | }; |
|
90 | 91 | |
|
91 | 92 | |
@@ -245,7 +246,8 b' var IPython = (function (IPython) {' | |||
|
245 | 246 | user_expressions : {}, |
|
246 | 247 | allow_stdin : false |
|
247 | 248 | }; |
|
248 |
|
|
|
249 | $.extend(true, content, options) | |
|
250 | $([IPython.events]).trigger('execution_request.Kernel', {kernel: this, content:content}); | |
|
249 | 251 | var msg = this._get_msg("execute_request", content); |
|
250 | 252 | this.shell_channel.send(JSON.stringify(msg)); |
|
251 | 253 | this.set_callbacks_for_msg(msg.header.msg_id, callbacks); |
@@ -279,7 +281,7 b' var IPython = (function (IPython) {' | |||
|
279 | 281 | |
|
280 | 282 | Kernel.prototype.interrupt = function () { |
|
281 | 283 | if (this.running) { |
|
282 |
$([IPython.events]).trigger( |
|
|
284 | $([IPython.events]).trigger('status_interrupting.Kernel', {kernel: this}); | |
|
283 | 285 | $.post(this.kernel_url + "/interrupt"); |
|
284 | 286 | }; |
|
285 | 287 | }; |
@@ -312,6 +314,7 b' var IPython = (function (IPython) {' | |||
|
312 | 314 | |
|
313 | 315 | Kernel.prototype._handle_shell_reply = function (e) { |
|
314 | 316 | reply = $.parseJSON(e.data); |
|
317 | $([IPython.events]).trigger('shell_reply.Kernel', {kernel: this, reply:reply}); | |
|
315 | 318 | var header = reply.header; |
|
316 | 319 | var content = reply.content; |
|
317 | 320 | var metadata = reply.metadata; |
@@ -367,12 +370,12 b' var IPython = (function (IPython) {' | |||
|
367 | 370 | } |
|
368 | 371 | } else if (msg_type === 'status') { |
|
369 | 372 | if (content.execution_state === 'busy') { |
|
370 |
$([IPython.events]).trigger( |
|
|
373 | $([IPython.events]).trigger('status_busy.Kernel', {kernel: this}); | |
|
371 | 374 | } else if (content.execution_state === 'idle') { |
|
372 |
$([IPython.events]).trigger( |
|
|
375 | $([IPython.events]).trigger('status_idle.Kernel', {kernel: this}); | |
|
373 | 376 | } else if (content.execution_state === 'dead') { |
|
374 | 377 | this.stop_channels(); |
|
375 |
$([IPython.events]).trigger( |
|
|
378 | $([IPython.events]).trigger('status_dead.Kernel', {kernel: this}); | |
|
376 | 379 | }; |
|
377 | 380 | } else if (msg_type === 'clear_output') { |
|
378 | 381 | var cb = callbacks['clear_output']; |
General Comments 0
You need to be logged in to leave comments.
Login now