Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates > by-pkgid > b9a6a1b9f2781444d2917afd8e4421ab > files > 645

ipython-doc-2.3.0-2.2.mga5.noarch.rpm

<!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: core.magics.config &mdash; 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: core.magics.deprecated" href="IPython.core.magics.deprecated.html" />
    <link rel="prev" title="Module: core.magics.code" href="IPython.core.magics.code.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.core.magics.deprecated.html" title="Module: core.magics.deprecated"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="IPython.core.magics.code.html" title="Module: core.magics.code"
             accesskey="P">previous</a> |</li>
        <li><a href="http://ipython.org">home</a>|&nbsp;</li>
        <li><a href="../../search.html">search</a>|&nbsp;</li>
       <li><a href="../../index.html">documentation </a> &raquo;</li>

          <li><a href="../index.html" accesskey="U">The IPython API</a> &raquo;</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">core.magics.config</span></tt></a><ul>
<li><a class="reference internal" href="#class">1 Class</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="IPython.core.magics.code.html"
                        title="previous chapter">Module: <tt class="docutils literal"><span class="pre">core.magics.code</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="IPython.core.magics.deprecated.html"
                        title="next chapter">Module: <tt class="docutils literal"><span class="pre">core.magics.deprecated</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/api/generated/IPython.core.magics.config.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.core.magics.config">
<span id="module-core-magics-config"></span><h1>Module: <tt class="xref py py-mod docutils literal"><span class="pre">core.magics.config</span></tt><a class="headerlink" href="#module-IPython.core.magics.config" title="Permalink to this headline">¶</a></h1>
<p>Implementation of configuration-related magic functions.</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.core.magics.config.ConfigMagics">
<em class="property">class </em><tt class="descclassname">IPython.core.magics.config.</tt><tt class="descname">ConfigMagics</tt><big>(</big><em>shell</em><big>)</big><a class="headerlink" href="#IPython.core.magics.config.ConfigMagics" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="IPython.core.magic.html#IPython.core.magic.Magics" title="IPython.core.magic.Magics"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic.Magics</span></tt></a></p>
<dl class="method">
<dt id="IPython.core.magics.config.ConfigMagics.__init__">
<tt class="descname">__init__</tt><big>(</big><em>shell</em><big>)</big><a class="headerlink" href="#IPython.core.magics.config.ConfigMagics.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="IPython.core.magics.config.ConfigMagics.config">
<tt class="descname">config</tt><big>(</big><em>s</em><big>)</big><a class="headerlink" href="#IPython.core.magics.config.ConfigMagics.config" title="Permalink to this definition">¶</a></dt>
<dd><p>configure IPython</p>
<blockquote>
<div>%config Class[.trait=value]</div></blockquote>
<p>This magic exposes most of the IPython config system. Any
Configurable class should be able to be configured with the simple
line:</p>
<div class="highlight-python"><div class="highlight"><pre>%config Class.trait=value
</pre></div>
</div>
<p>Where <cite>value</cite> will be resolved in the user&#8217;s namespace, if it is an
expression or variable name.</p>
<p class="rubric">Examples</p>
<p>To see what classes are available for config, pass no arguments:</p>
<div class="highlight-python"><div class="highlight"><pre>In [1]: %config
Available objects for config:
    TerminalInteractiveShell
    HistoryManager
    PrefilterManager
    AliasManager
    IPCompleter
    PromptManager
    DisplayFormatter
</pre></div>
</div>
<p>To view what is configurable on a given class, just pass the class
name:</p>
<div class="highlight-python"><div class="highlight"><pre>In [2]: %config IPCompleter
IPCompleter options
-----------------
IPCompleter.omit__names=&lt;Enum&gt;
    Current: 2
    Choices: (0, 1, 2)
    Instruct the completer to omit private method names
    Specifically, when completing on ``object.&lt;tab&gt;``.
    When 2 [default]: all names that start with &#39;_&#39; will be excluded.
    When 1: all &#39;magic&#39; names (``__foo__``) will be excluded.
    When 0: nothing will be excluded.
IPCompleter.merge_completions=&lt;CBool&gt;
    Current: True
    Whether to merge completion results into a single list
    If False, only the completion results from the first non-empty
    completer will be returned.
IPCompleter.limit_to__all__=&lt;CBool&gt;
    Current: False
    Instruct the completer to use __all__ for the completion
    Specifically, when completing on ``object.&lt;tab&gt;``.
    When True: only those names in obj.__all__ will be included.
    When False [default]: the __all__ attribute is ignored
IPCompleter.greedy=&lt;CBool&gt;
    Current: False
    Activate greedy completion
    This will enable completion on elements of lists, results of
    function calls, etc., but can be unsafe because the code is
    actually evaluated on TAB.
</pre></div>
</div>
<p>but the real use is in setting values:</p>
<div class="highlight-python"><div class="highlight"><pre>In [3]: %config IPCompleter.greedy = True
</pre></div>
</div>
<p>and these values are read from the user_ns if they are variables:</p>
<div class="highlight-python"><div class="highlight"><pre>In [4]: feeling_greedy=False

In [5]: %config IPCompleter.greedy = feeling_greedy
</pre></div>
</div>
</dd></dl>

</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.core.magics.deprecated.html" title="Module: core.magics.deprecated"
             >next</a> |</li>
        <li class="right" >
          <a href="IPython.core.magics.code.html" title="Module: core.magics.code"
             >previous</a> |</li>
        <li><a href="http://ipython.org">home</a>|&nbsp;</li>
        <li><a href="../../search.html">search</a>|&nbsp;</li>
       <li><a href="../../index.html">documentation </a> &raquo;</li>

          <li><a href="../index.html" >The IPython API</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; 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>