Show More
@@ -343,11 +343,11 b' class IPythonConsoleApp(Configurable):' | |||||
343 | connection_file=self.connection_file, |
|
343 | connection_file=self.connection_file, | |
344 | config=self.config, |
|
344 | config=self.config, | |
345 | ) |
|
345 | ) | |
346 | # start the kernel |
|
346 | self.kernel_manager.client_factory = self.kernel_client_class | |
347 | if not self.existing: |
|
347 | self.kernel_manager.start_kernel(extra_arguments=self.kernel_argv) | |
348 | self.kernel_manager.start_kernel(extra_arguments=self.kernel_argv) |
|
348 | atexit.register(self.kernel_manager.cleanup_ipc_files) | |
349 | atexit.register(self.kernel_manager.cleanup_ipc_files) |
|
349 | ||
350 |
|
|
350 | if self.sshserver: | |
351 | # ssh, write new connection file |
|
351 | # ssh, write new connection file | |
352 | self.kernel_manager.write_connection_file() |
|
352 | self.kernel_manager.write_connection_file() | |
353 |
|
353 | |||
@@ -362,14 +362,17 b' class IPythonConsoleApp(Configurable):' | |||||
362 | atexit.register(self.kernel_manager.cleanup_connection_file) |
|
362 | atexit.register(self.kernel_manager.cleanup_connection_file) | |
363 |
|
363 | |||
364 | def init_kernel_client(self): |
|
364 | def init_kernel_client(self): | |
365 | self.kernel_client = self.kernel_client_class( |
|
365 | if self.kernel_manager is not None: | |
|
366 | self.kernel_client = self.kernel_manager.client() | |||
|
367 | else: | |||
|
368 | self.kernel_client = self.kernel_client_class( | |||
366 | shell_port=self.shell_port, |
|
369 | shell_port=self.shell_port, | |
367 | iopub_port=self.iopub_port, |
|
370 | iopub_port=self.iopub_port, | |
368 | stdin_port=self.stdin_port, |
|
371 | stdin_port=self.stdin_port, | |
369 | hb_port=self.hb_port, |
|
372 | hb_port=self.hb_port, | |
370 | connection_file=self.connection_file, |
|
373 | connection_file=self.connection_file, | |
371 | config=self.config, |
|
374 | config=self.config, | |
372 | ) |
|
375 | ) | |
373 |
|
376 | |||
374 | self.kernel_client.start_channels() |
|
377 | self.kernel_client.start_channels() | |
375 |
|
378 |
General Comments 0
You need to be logged in to leave comments.
Login now