Show More
@@ -330,8 +330,9 b' class MainKernelHandler(AuthenticatedHandler):' | |||
|
330 | 330 | @web.authenticated |
|
331 | 331 | def post(self): |
|
332 | 332 | km = self.application.kernel_manager |
|
333 | nbm = self.application.notebook_manager | |
|
333 | 334 | notebook_id = self.get_argument('notebook', default=None) |
|
334 | kernel_id = km.start_kernel(notebook_id) | |
|
335 | kernel_id = km.start_kernel(notebook_id, cwd=nbm.notebook_dir) | |
|
335 | 336 | data = {'ws_url':self.ws_url,'kernel_id':kernel_id} |
|
336 | 337 | self.set_header('Location', '/'+kernel_id) |
|
337 | 338 | self.finish(jsonapi.dumps(data)) |
@@ -245,7 +245,7 b' class MappingKernelManager(MultiKernelManager):' | |||
|
245 | 245 | if notebook_id is not None: |
|
246 | 246 | del self._notebook_mapping[notebook_id] |
|
247 | 247 | |
|
248 | def start_kernel(self, notebook_id=None): | |
|
248 | def start_kernel(self, notebook_id=None, **kwargs): | |
|
249 | 249 | """Start a kernel for a notebok an return its kernel_id. |
|
250 | 250 | |
|
251 | 251 | Parameters |
@@ -257,7 +257,6 b' class MappingKernelManager(MultiKernelManager):' | |||
|
257 | 257 | """ |
|
258 | 258 | kernel_id = self.kernel_for_notebook(notebook_id) |
|
259 | 259 | if kernel_id is None: |
|
260 | kwargs = dict() | |
|
261 | 260 | kwargs['extra_arguments'] = self.kernel_argv |
|
262 | 261 | kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs) |
|
263 | 262 | self.set_kernel_for_notebook(notebook_id, kernel_id) |
@@ -407,7 +407,6 b' class NotebookApp(BaseIPythonApplication):' | |||
|
407 | 407 | def init_configurables(self): |
|
408 | 408 | # force Session default to be secure |
|
409 | 409 | default_secure(self.config) |
|
410 | # Create a KernelManager and start a kernel. | |
|
411 | 410 | self.kernel_manager = MappingKernelManager( |
|
412 | 411 | config=self.config, log=self.log, kernel_argv=self.kernel_argv, |
|
413 | 412 | connection_dir = self.profile_dir.security_dir, |
General Comments 0
You need to be logged in to leave comments.
Login now