mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Merge pull request #4343 from jasongrout/kernel-parameters
Make parameters for kernel start method more general
This commit is contained in:
commit
01932536fe
@ -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++) {
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user