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

Module: kernel.comm.manager

Base class to manage comms

1 Class

class IPython.kernel.comm.manager.CommManager(**kwargs)

Bases: IPython.config.configurable.LoggingConfigurable

Manager for Comms in the Kernel

comm_close(stream, ident, msg)

Handler for comm_close messages

comm_msg(stream, ident, msg)

Handler for comm_msg messages

comm_open(stream, ident, msg)

Handler for comm_open messages


Get a comm with a particular id

Returns the comm if found, otherwise None.

This will not raise an error, it will log messages if the comm cannot be found.


Register a new comm

register_target(target_name, f)

Register a callable f for a given target name

f will be called with two arguments when a comm_open message is received with target:

  • the Comm instance
  • the comm_open message itself.

f can be a Python callable or an import string for one.


Unregister a comm, and close its counterpart

unregister_target(target_name, f)

Unregister a callable registered with register_target

1 Function


Return lazy-evaluated string representation of a dictionary’s keys

Key list is only constructed if it will actually be used. Used for debug-logging.