##// END OF EJS Templates
Merge pull request #3079 from minrk/kernel_class...
Fernando Perez -
r10047:e6820954 merge
parent child Browse files
Show More
@@ -108,7 +108,12 b' class IPKernelApp(BaseIPythonApplication, InteractiveShellApp):'
108 flags = Dict(kernel_flags)
108 flags = Dict(kernel_flags)
109 classes = [Kernel, ZMQInteractiveShell, ProfileDir, Session]
109 classes = [Kernel, ZMQInteractiveShell, ProfileDir, Session]
110 # the kernel class, as an importstring
110 # the kernel class, as an importstring
111 kernel_class = DottedObjectName('IPython.kernel.zmq.ipkernel.Kernel')
111 kernel_class = DottedObjectName('IPython.kernel.zmq.ipkernel.Kernel', config=True,
112 help="""The Kernel subclass to be used.
113
114 This should allow easy re-use of the IPKernelApp entry point
115 to configure and launch kernels other than IPython's own.
116 """)
112 kernel = Any()
117 kernel = Any()
113 poller = Any() # don't restrict this even though current pollers are all Threads
118 poller = Any() # don't restrict this even though current pollers are all Threads
114 heartbeat = Instance(Heartbeat)
119 heartbeat = Instance(Heartbeat)
@@ -348,8 +353,10 b' class IPKernelApp(BaseIPythonApplication, InteractiveShellApp):'
348 def init_kernel(self):
353 def init_kernel(self):
349 """Create the Kernel object itself"""
354 """Create the Kernel object itself"""
350 shell_stream = ZMQStream(self.shell_socket)
355 shell_stream = ZMQStream(self.shell_socket)
356
357 kernel_factory = import_item(str(self.kernel_class))
351
358
352 kernel = Kernel(config=self.config, session=self.session,
359 kernel = kernel_factory(config=self.config, session=self.session,
353 shell_streams=[shell_stream],
360 shell_streams=[shell_stream],
354 iopub_socket=self.iopub_socket,
361 iopub_socket=self.iopub_socket,
355 stdin_socket=self.stdin_socket,
362 stdin_socket=self.stdin_socket,
General Comments 0
You need to be logged in to leave comments. Login now