This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: kernel.multikernelmanager

A kernel manager for multiple kernels

2 Classes

class IPython.kernel.multikernelmanager.DuplicateKernelError

Bases: Exception

class IPython.kernel.multikernelmanager.MultiKernelManager(**kwargs)

Bases: IPython.config.configurable.LoggingConfigurable

A class for managing multiple kernels.


Get the single KernelManager object for a kernel by its uuid.


kernel_id : uuid

The id of the kernel.


Return a list of the kernel ids of the active kernels.


remove a kernel from our mapping.

Mainly so that a kernel can be removed if it is already dead, without having to call shutdown_kernel.

The kernel object is returned.


Shutdown all kernels.

start_kernel(kernel_name=None, **kwargs)

Start a new kernel.

The caller can pick a kernel_id by passing one in as a keyword arg, otherwise one will be picked using a uuid.

To silence the kernel’s stdout/stderr, call this using:

km.start_kernel(stdout=PIPE, stderr=PIPE)

1 Function


decorator for proxying MKM.method(kernel_id) to individual KMs by ID