##// END OF EJS Templates
use KM.client() method in ConsoleApp
MinRK -
Show More
@@ -343,11 +343,11 b' class IPythonConsoleApp(Configurable):'
343 343 connection_file=self.connection_file,
344 344 config=self.config,
345 345 )
346 # start the kernel
347 if not self.existing:
348 self.kernel_manager.start_kernel(extra_arguments=self.kernel_argv)
349 atexit.register(self.kernel_manager.cleanup_ipc_files)
350 elif self.sshserver:
346 self.kernel_manager.client_factory = self.kernel_client_class
347 self.kernel_manager.start_kernel(extra_arguments=self.kernel_argv)
348 atexit.register(self.kernel_manager.cleanup_ipc_files)
349
350 if self.sshserver:
351 351 # ssh, write new connection file
352 352 self.kernel_manager.write_connection_file()
353 353
@@ -362,14 +362,17 b' class IPythonConsoleApp(Configurable):'
362 362 atexit.register(self.kernel_manager.cleanup_connection_file)
363 363
364 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 369 shell_port=self.shell_port,
367 370 iopub_port=self.iopub_port,
368 371 stdin_port=self.stdin_port,
369 372 hb_port=self.hb_port,
370 373 connection_file=self.connection_file,
371 374 config=self.config,
372 )
375 )
373 376
374 377 self.kernel_client.start_channels()
375 378
General Comments 0
You need to be logged in to leave comments. Login now