Warning

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

Authors:

  • Brian Granger

2 Classes

class IPython.kernel.multikernelmanager.DuplicateKernelError

Bases: exceptions.Exception

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

Bases: IPython.config.configurable.LoggingConfigurable

A class for managing multiple kernels.

get_kernel(kernel_id)

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

Parameters:

kernel_id : uuid

The id of the kernel.

list_kernel_ids()

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

remove_kernel(kernel_id)

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(now=False)

Shutdown all kernels.

start_kernel(**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

IPython.kernel.multikernelmanager.kernel_method(f)

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