Show More
@@ -11,7 +11,7 b'' | |||
|
11 | 11 | # Imports |
|
12 | 12 | #----------------------------------------------------------------------------- |
|
13 | 13 | |
|
14 | from IPython.utils.traitlets import Instance | |
|
14 | from IPython.utils.traitlets import Instance, DottedObjectName | |
|
15 | 15 | from IPython.kernel.managerabc import KernelManagerABC |
|
16 | 16 | from IPython.kernel.manager import KernelManager |
|
17 | 17 | |
@@ -31,6 +31,8 b' class InProcessKernelManager(KernelManager):' | |||
|
31 | 31 | |
|
32 | 32 | # The kernel process with which the KernelManager is communicating. |
|
33 | 33 | kernel = Instance('IPython.kernel.inprocess.ipkernel.InProcessKernel') |
|
34 | # the client class for KM.client() shortcut | |
|
35 | client_class = DottedObjectName('IPython.kernel.inprocess.BlockingInProcessKernelClient') | |
|
34 | 36 | |
|
35 | 37 | #-------------------------------------------------------------------------- |
|
36 | 38 | # Kernel management methods |
@@ -61,7 +63,11 b' class InProcessKernelManager(KernelManager):' | |||
|
61 | 63 | raise NotImplementedError("Cannot signal in-process kernel.") |
|
62 | 64 | |
|
63 | 65 | def is_alive(self): |
|
64 | return True | |
|
66 | return self.kernel is not None | |
|
67 | ||
|
68 | def client(self, **kwargs): | |
|
69 | kwargs['kernel'] = self.kernel | |
|
70 | return super(InProcessKernelManager, self).client(**kwargs) | |
|
65 | 71 | |
|
66 | 72 | |
|
67 | 73 | #----------------------------------------------------------------------------- |
General Comments 0
You need to be logged in to leave comments.
Login now