Warning

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

Module: kernel.comm.comm

Base class for a Comm

1 Class

class IPython.kernel.comm.comm.Comm(target_name='', data=None, **kwargs)

Bases: IPython.config.configurable.LoggingConfigurable

__init__(target_name='', data=None, **kwargs)
close(data=None, metadata=None)

Close the frontend-side version of this comm

handle_close(msg)

Handle a comm_close message

handle_msg(msg)

Handle a comm_msg message

on_close(callback)

Register a callback for comm_close

Will be called with the data of the close message.

Call on_close(None) to disable an existing callback.

on_msg(callback)

Register a callback for comm_msg

Will be called with the data of any comm_msg messages.

Call on_msg(None) to disable an existing callback.

open(data=None, metadata=None)

Open the frontend-side version of this comm

send(data=None, metadata=None)

Send a message to the frontend-side version of this comm