Merge pull request #4343 from jasongrout/kernel-parameters

Make parameters for kernel start method more general
This commit is contained in:
Min RK 2013-10-03 21:33:47 -07:00
commit 01932536fe
2 changed files with 3 additions and 3 deletions

View File

@ -1370,7 +1370,7 @@ var IPython = (function (IPython) {
Notebook.prototype.start_kernel = function () {
var base_url = $('body').data('baseKernelUrl') + "kernels";
this.kernel = new IPython.Kernel(base_url);
this.kernel.start(this.notebook_id);
this.kernel.start({notebook: this.notebook_id});
// Now that the kernel has been created, tell the CodeCells about it.
var ncells = this.ncells();
for (var i=0; i<ncells; i++) {

View File

@ -72,10 +72,10 @@ var IPython = (function (IPython) {
* Start the Python kernel
* @method start
*/
Kernel.prototype.start = function (notebook_id) {
Kernel.prototype.start = function (params) {
var that = this;
if (!this.running) {
var qs = $.param({notebook:notebook_id});
var qs = $.param(params);
var url = this.base_url + '?' + qs;
$.post(url,
$.proxy(that._kernel_started,that),