<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Module: kernel.comm.manager — IPython 2.3.0 documentation</title> <link rel="stylesheet" href="../../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../', VERSION: '2.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../_static/jquery.js"></script> <script type="text/javascript" src="../../_static/underscore.js"></script> <script type="text/javascript" src="../../_static/doctools.js"></script> <link rel="top" title="IPython 2.3.0 documentation" href="../../index.html" /> <link rel="up" title="The IPython API" href="../index.html" /> <link rel="next" title="Module: kernel.connect" href="IPython.kernel.connect.html" /> <link rel="prev" title="Module: kernel.comm.comm" href="IPython.kernel.comm.comm.html" /> </head> <body> <div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px"> <a href="http://ipython.org/"><img src="../../_static/logo.png" border="0" alt="IPython Documentation"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="IPython.kernel.connect.html" title="Module: kernel.connect" accesskey="N">next</a> |</li> <li class="right" > <a href="IPython.kernel.comm.comm.html" title="Module: kernel.comm.comm" accesskey="P">previous</a> |</li> <li><a href="http://ipython.org">home</a>| </li> <li><a href="../../search.html">search</a>| </li> <li><a href="../../index.html">documentation </a> »</li> <li><a href="../index.html" accesskey="U">The IPython API</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Module: <tt class="docutils literal"><span class="pre">kernel.comm.manager</span></tt></a><ul> <li><a class="reference internal" href="#class">1 Class</a></li> <li><a class="reference internal" href="#functions">2 Functions</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="IPython.kernel.comm.comm.html" title="previous chapter">Module: <tt class="docutils literal"><span class="pre">kernel.comm.comm</span></tt></a></p> <h4>Next topic</h4> <p class="topless"><a href="IPython.kernel.connect.html" title="next chapter">Module: <tt class="docutils literal"><span class="pre">kernel.connect</span></tt></a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../_sources/api/generated/IPython.kernel.comm.manager.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="module-IPython.kernel.comm.manager"> <span id="module-kernel-comm-manager"></span><h1>Module: <tt class="xref py py-mod docutils literal"><span class="pre">kernel.comm.manager</span></tt><a class="headerlink" href="#module-IPython.kernel.comm.manager" title="Permalink to this headline">¶</a></h1> <p>Base class to manage comms</p> <div class="section" id="class"> <h2>1 Class<a class="headerlink" href="#class" title="Permalink to this headline">¶</a></h2> <dl class="class"> <dt id="IPython.kernel.comm.manager.CommManager"> <em class="property">class </em><tt class="descclassname">IPython.kernel.comm.manager.</tt><tt class="descname">CommManager</tt><big>(</big><em>**kwargs</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.CommManager" title="Permalink to this definition">¶</a></dt> <dd><p>Bases: <a class="reference internal" href="IPython.config.configurable.html#IPython.config.configurable.LoggingConfigurable" title="IPython.config.configurable.LoggingConfigurable"><tt class="xref py py-class docutils literal"><span class="pre">IPython.config.configurable.LoggingConfigurable</span></tt></a></p> <p>Manager for Comms in the Kernel</p> <dl class="method"> <dt id="IPython.kernel.comm.manager.CommManager.get_comm"> <tt class="descname">get_comm</tt><big>(</big><em>comm_id</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.CommManager.get_comm" title="Permalink to this definition">¶</a></dt> <dd><p>Get a comm with a particular id</p> <p>Returns the comm if found, otherwise None.</p> <p>This will not raise an error, it will log messages if the comm cannot be found.</p> </dd></dl> <dl class="method"> <dt id="IPython.kernel.comm.manager.CommManager.register_comm"> <tt class="descname">register_comm</tt><big>(</big><em>comm</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.CommManager.register_comm" title="Permalink to this definition">¶</a></dt> <dd><p>Register a new comm</p> </dd></dl> <dl class="method"> <dt id="IPython.kernel.comm.manager.CommManager.register_target"> <tt class="descname">register_target</tt><big>(</big><em>target_name</em>, <em>f</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.CommManager.register_target" title="Permalink to this definition">¶</a></dt> <dd><p>Register a callable f for a given target name</p> <p>f will be called with two arguments when a comm_open message is received with <cite>target</cite>:</p> <ul class="simple"> <li>the Comm instance</li> <li>the <cite>comm_open</cite> message itself.</li> </ul> <p>f can be a Python callable or an import string for one.</p> </dd></dl> <dl class="method"> <dt id="IPython.kernel.comm.manager.CommManager.unregister_comm"> <tt class="descname">unregister_comm</tt><big>(</big><em>comm_id</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.CommManager.unregister_comm" title="Permalink to this definition">¶</a></dt> <dd><p>Unregister a comm, and close its counterpart</p> </dd></dl> <dl class="method"> <dt id="IPython.kernel.comm.manager.CommManager.unregister_target"> <tt class="descname">unregister_target</tt><big>(</big><em>target_name</em>, <em>f</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.CommManager.unregister_target" title="Permalink to this definition">¶</a></dt> <dd><p>Unregister a callable registered with register_target</p> </dd></dl> </dd></dl> </div> <div class="section" id="functions"> <h2>2 Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2> <dl class="function"> <dt id="IPython.kernel.comm.manager.lazy_keys"> <tt class="descclassname">IPython.kernel.comm.manager.</tt><tt class="descname">lazy_keys</tt><big>(</big><em>dikt</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.lazy_keys" title="Permalink to this definition">¶</a></dt> <dd><p>Return lazy-evaluated string representation of a dictionary’s keys</p> <p>Key list is only constructed if it will actually be used. Used for debug-logging.</p> </dd></dl> <dl class="function"> <dt id="IPython.kernel.comm.manager.with_output"> <tt class="descclassname">IPython.kernel.comm.manager.</tt><tt class="descname">with_output</tt><big>(</big><em>method</em><big>)</big><a class="headerlink" href="#IPython.kernel.comm.manager.with_output" title="Permalink to this definition">¶</a></dt> <dd><p>method decorator for ensuring output is handled properly in a message handler</p> <ul class="simple"> <li>sets parent header before entering the method</li> <li>publishes busy/idle</li> <li>flushes stdout/stderr after</li> </ul> </dd></dl> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="IPython.kernel.connect.html" title="Module: kernel.connect" >next</a> |</li> <li class="right" > <a href="IPython.kernel.comm.comm.html" title="Module: kernel.comm.comm" >previous</a> |</li> <li><a href="http://ipython.org">home</a>| </li> <li><a href="../../search.html">search</a>| </li> <li><a href="../../index.html">documentation </a> »</li> <li><a href="../index.html" >The IPython API</a> »</li> </ul> </div> <div class="footer"> © Copyright The IPython Development Team. Last updated on Jul 14, 2015. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3. </div> </body> </html>