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