##// END OF EJS Templates
bind kernel events in Kernel.bind_events...
MinRK -
Show More
@@ -42,6 +42,7 b' var IPython = (function (IPython) {'
42 } else {
42 } else {
43 alert('Your browser does not have WebSocket support, please try Chrome, Safari or Firefox ≥ 6. Firefox 4 and 5 are also supported by you have to enable WebSockets in about:config.');
43 alert('Your browser does not have WebSocket support, please try Chrome, Safari or Firefox ≥ 6. Firefox 4 and 5 are also supported by you have to enable WebSockets in about:config.');
44 };
44 };
45 this.bind_events();
45 };
46 };
46
47
47
48
@@ -59,6 +60,13 b' var IPython = (function (IPython) {'
59 };
60 };
60 return msg;
61 return msg;
61 };
62 };
63
64 Kernel.prototype.bind_events = function() {
65 var that = this;
66 $([IPython.events]).on('send_input_reply.Kernel', function(evt, data) {
67 that.send_input_reply(data);
68 });
69 }
62
70
63 /**
71 /**
64 * Start the Python kernel
72 * Start the Python kernel
@@ -176,10 +184,6 b' var IPython = (function (IPython) {'
176 this.shell_channel.onmessage = $.proxy(this._handle_shell_reply, this);
184 this.shell_channel.onmessage = $.proxy(this._handle_shell_reply, this);
177 this.iopub_channel.onmessage = $.proxy(this._handle_iopub_reply, this);
185 this.iopub_channel.onmessage = $.proxy(this._handle_iopub_reply, this);
178 this.stdin_channel.onmessage = $.proxy(this._handle_input_request, this);
186 this.stdin_channel.onmessage = $.proxy(this._handle_input_request, this);
179
180 $([IPython.events]).on('send_input_reply.Kernel', function(evt, data) {
181 that.send_input_reply(data);
182 });
183 };
187 };
184
188
185 /**
189 /**
General Comments 0
You need to be logged in to leave comments. Login now