Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates > by-pkgid > c044f82ec6193fba7e13c97913613b07 > files > 641

ipython-doc-2.3.0-2.3.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.magic_arguments &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" href="IPython.core.magics.html" />
    <link rel="prev" title="Module: core.magic" href="IPython.core.magic.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.html" title="Module: core.magics"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="IPython.core.magic.html" title="Module: core.magic"
             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.magic_arguments</span></tt></a><ul>
<li><a class="reference internal" href="#classes">8 Classes</a></li>
<li><a class="reference internal" href="#functions">3 Functions</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="IPython.core.magic.html"
                        title="previous chapter">Module: <tt class="docutils literal"><span class="pre">core.magic</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="IPython.core.magics.html"
                        title="next chapter">Module: <tt class="docutils literal"><span class="pre">core.magics</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/api/generated/IPython.core.magic_arguments.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.magic_arguments">
<span id="module-core-magic-arguments"></span><h1>Module: <tt class="xref py py-mod docutils literal"><span class="pre">core.magic_arguments</span></tt><a class="headerlink" href="#module-IPython.core.magic_arguments" title="Permalink to this headline">¶</a></h1>
<p>A decorator-based method of constructing IPython magics with <cite>argparse</cite>
option handling.</p>
<p>New magic functions can be defined like so:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">IPython.core.magic_arguments</span> <span class="kn">import</span> <span class="p">(</span><span class="n">argument</span><span class="p">,</span> <span class="n">magic_arguments</span><span class="p">,</span>
    <span class="n">parse_argstring</span><span class="p">)</span>

<span class="nd">@magic_arguments</span><span class="p">()</span>
<span class="nd">@argument</span><span class="p">(</span><span class="s">&#39;-o&#39;</span><span class="p">,</span> <span class="s">&#39;--option&#39;</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;An optional argument.&#39;</span><span class="p">)</span>
<span class="nd">@argument</span><span class="p">(</span><span class="s">&#39;arg&#39;</span><span class="p">,</span> <span class="nb">type</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span> <span class="n">help</span><span class="o">=</span><span class="s">&#39;An integer positional argument.&#39;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">magic_cool</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">arg</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot; A really cool magic command.</span>

<span class="sd">&quot;&quot;&quot;</span>
    <span class="n">args</span> <span class="o">=</span> <span class="n">parse_argstring</span><span class="p">(</span><span class="n">magic_cool</span><span class="p">,</span> <span class="n">arg</span><span class="p">)</span>
    <span class="o">...</span>
</pre></div>
</div>
<p>The <cite>&#64;magic_arguments</cite> decorator marks the function as having argparse arguments.
The <cite>&#64;argument</cite> decorator adds an argument using the same syntax as argparse&#8217;s
<cite>add_argument()</cite> method. More sophisticated uses may also require the
<cite>&#64;argument_group</cite> or <cite>&#64;kwds</cite> decorator to customize the formatting and the
parsing.</p>
<p>Help text for the magic is automatically generated from the docstring and the
arguments:</p>
<div class="highlight-python"><div class="highlight"><pre>In[1]: %cool?
    %cool [-o OPTION] arg
    
    A really cool magic command.
    
    positional arguments:
      arg                   An integer positional argument.
    
    optional arguments:
      -o OPTION, --option OPTION
                            An optional argument.
</pre></div>
</div>
<p>Inheritance diagram:</p>
<p class="graphviz">
digraph inheritance20cd358b90 {
rankdir=LR;
size=&quot;8.0, 12.0&quot;;
  &quot;argparse.ArgumentParser&quot; [style=&quot;setlinewidth(0.5)&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Object for parsing command line strings into Python objects.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;argparse.HelpFormatter&quot; [style=&quot;setlinewidth(0.5)&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Formatter for generating usage messages and argument help strings.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;argparse.RawDescriptionHelpFormatter&quot; [style=&quot;setlinewidth(0.5)&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Help message formatter which retains any formatting in descriptions.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;argparse.HelpFormatter&quot; -&gt; &quot;argparse.RawDescriptionHelpFormatter&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.ArgDecorator&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.ArgDecorator&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Base class for decorators to add ArgumentParser information to a method.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgMethodWrapper&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.ArgMethodWrapper&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Base class to define a wrapper for ArgumentParser method.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgDecorator&quot; -&gt; &quot;core.magic_arguments.ArgMethodWrapper&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.MagicArgumentParser&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.MagicArgumentParser&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;An ArgumentParser tweaked for use by IPython magics.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;argparse.ArgumentParser&quot; -&gt; &quot;core.magic_arguments.MagicArgumentParser&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.MagicHelpFormatter&quot; [style=&quot;setlinewidth(0.5)&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;A HelpFormatter with a couple of changes to meet our needs.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;argparse.RawDescriptionHelpFormatter&quot; -&gt; &quot;core.magic_arguments.MagicHelpFormatter&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.argument&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.argument&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Store arguments and keywords to pass to add_argument().&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgMethodWrapper&quot; -&gt; &quot;core.magic_arguments.argument&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.argument_group&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.argument_group&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Store arguments and keywords to pass to add_argument_group().&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgMethodWrapper&quot; -&gt; &quot;core.magic_arguments.argument_group&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.defaults&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.defaults&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Store arguments and keywords to pass to set_defaults().&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgMethodWrapper&quot; -&gt; &quot;core.magic_arguments.defaults&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.kwds&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.kwds&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Provide other keywords to the sub-parser constructor.&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgDecorator&quot; -&gt; &quot;core.magic_arguments.kwds&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
  &quot;core.magic_arguments.magic_arguments&quot; [style=&quot;setlinewidth(0.5)&quot;,URL=&quot;#IPython.core.magic_arguments.magic_arguments&quot;,fontname=&quot;Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans&quot;,tooltip=&quot;Mark the magic as having argparse arguments and possibly adjust the&quot;,height=0.25,shape=box,fontsize=10];
  &quot;core.magic_arguments.ArgDecorator&quot; -&gt; &quot;core.magic_arguments.magic_arguments&quot; [arrowsize=0.5,style=&quot;setlinewidth(0.5)&quot;];
}
</p>
<div class="section" id="classes">
<h2>8 Classes<a class="headerlink" href="#classes" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="IPython.core.magic_arguments.MagicArgumentParser">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">MagicArgumentParser</tt><big>(</big><em>prog=None</em>, <em>usage=None</em>, <em>description=None</em>, <em>epilog=None</em>, <em>parents=None</em>, <em>formatter_class=&lt;class 'IPython.core.magic_arguments.MagicHelpFormatter'&gt;</em>, <em>prefix_chars='-'</em>, <em>argument_default=None</em>, <em>conflict_handler='error'</em>, <em>add_help=False</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.MagicArgumentParser" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="http://docs.python.org/2/library/argparse.html#argparse.ArgumentParser" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">argparse.ArgumentParser</span></tt></a></p>
<p>An ArgumentParser tweaked for use by IPython magics.</p>
<dl class="method">
<dt id="IPython.core.magic_arguments.MagicArgumentParser.__init__">
<tt class="descname">__init__</tt><big>(</big><em>prog=None</em>, <em>usage=None</em>, <em>description=None</em>, <em>epilog=None</em>, <em>parents=None</em>, <em>formatter_class=&lt;class 'IPython.core.magic_arguments.MagicHelpFormatter'&gt;</em>, <em>prefix_chars='-'</em>, <em>argument_default=None</em>, <em>conflict_handler='error'</em>, <em>add_help=False</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.MagicArgumentParser.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="IPython.core.magic_arguments.MagicArgumentParser.error">
<tt class="descname">error</tt><big>(</big><em>message</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.MagicArgumentParser.error" title="Permalink to this definition">¶</a></dt>
<dd><p>Raise a catchable error instead of exiting.</p>
</dd></dl>

<dl class="method">
<dt id="IPython.core.magic_arguments.MagicArgumentParser.parse_argstring">
<tt class="descname">parse_argstring</tt><big>(</big><em>argstring</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.MagicArgumentParser.parse_argstring" title="Permalink to this definition">¶</a></dt>
<dd><p>Split a string into an argument list and parse that argument list.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.ArgDecorator">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">ArgDecorator</tt><a class="headerlink" href="#IPython.core.magic_arguments.ArgDecorator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="http://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
<p>Base class for decorators to add ArgumentParser information to a method.</p>
<dl class="method">
<dt id="IPython.core.magic_arguments.ArgDecorator.add_to_parser">
<tt class="descname">add_to_parser</tt><big>(</big><em>parser</em>, <em>group</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.ArgDecorator.add_to_parser" title="Permalink to this definition">¶</a></dt>
<dd><p>Add this object&#8217;s information to the parser, if necessary.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.magic_arguments">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">magic_arguments</tt><big>(</big><em>name=None</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.magic_arguments" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#IPython.core.magic_arguments.ArgDecorator" title="IPython.core.magic_arguments.ArgDecorator"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic_arguments.ArgDecorator</span></tt></a></p>
<p>Mark the magic as having argparse arguments and possibly adjust the
name.</p>
<dl class="method">
<dt id="IPython.core.magic_arguments.magic_arguments.__init__">
<tt class="descname">__init__</tt><big>(</big><em>name=None</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.magic_arguments.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.ArgMethodWrapper">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">ArgMethodWrapper</tt><big>(</big><em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.ArgMethodWrapper" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#IPython.core.magic_arguments.ArgDecorator" title="IPython.core.magic_arguments.ArgDecorator"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic_arguments.ArgDecorator</span></tt></a></p>
<p>Base class to define a wrapper for ArgumentParser method.</p>
<p>Child class must define either <cite>_method_name</cite> or <cite>add_to_parser</cite>.</p>
<dl class="method">
<dt id="IPython.core.magic_arguments.ArgMethodWrapper.__init__">
<tt class="descname">__init__</tt><big>(</big><em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.ArgMethodWrapper.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="IPython.core.magic_arguments.ArgMethodWrapper.add_to_parser">
<tt class="descname">add_to_parser</tt><big>(</big><em>parser</em>, <em>group</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.ArgMethodWrapper.add_to_parser" title="Permalink to this definition">¶</a></dt>
<dd><p>Add this object&#8217;s information to the parser.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.argument">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">argument</tt><big>(</big><em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.argument" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#IPython.core.magic_arguments.ArgMethodWrapper" title="IPython.core.magic_arguments.ArgMethodWrapper"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic_arguments.ArgMethodWrapper</span></tt></a></p>
<p>Store arguments and keywords to pass to add_argument().</p>
<p>Instances also serve to decorate command methods.</p>
</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.defaults">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">defaults</tt><big>(</big><em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.defaults" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#IPython.core.magic_arguments.ArgMethodWrapper" title="IPython.core.magic_arguments.ArgMethodWrapper"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic_arguments.ArgMethodWrapper</span></tt></a></p>
<p>Store arguments and keywords to pass to set_defaults().</p>
<p>Instances also serve to decorate command methods.</p>
</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.argument_group">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">argument_group</tt><big>(</big><em>*args</em>, <em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.argument_group" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#IPython.core.magic_arguments.ArgMethodWrapper" title="IPython.core.magic_arguments.ArgMethodWrapper"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic_arguments.ArgMethodWrapper</span></tt></a></p>
<p>Store arguments and keywords to pass to add_argument_group().</p>
<p>Instances also serve to decorate command methods.</p>
<dl class="method">
<dt id="IPython.core.magic_arguments.argument_group.add_to_parser">
<tt class="descname">add_to_parser</tt><big>(</big><em>parser</em>, <em>group</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.argument_group.add_to_parser" title="Permalink to this definition">¶</a></dt>
<dd><p>Add this object&#8217;s information to the parser.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="IPython.core.magic_arguments.kwds">
<em class="property">class </em><tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">kwds</tt><big>(</big><em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.kwds" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#IPython.core.magic_arguments.ArgDecorator" title="IPython.core.magic_arguments.ArgDecorator"><tt class="xref py py-class docutils literal"><span class="pre">IPython.core.magic_arguments.ArgDecorator</span></tt></a></p>
<p>Provide other keywords to the sub-parser constructor.</p>
<dl class="method">
<dt id="IPython.core.magic_arguments.kwds.__init__">
<tt class="descname">__init__</tt><big>(</big><em>**kwds</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.kwds.__init__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="functions">
<h2>3 Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="IPython.core.magic_arguments.construct_parser">
<tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">construct_parser</tt><big>(</big><em>magic_func</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.construct_parser" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct an argument parser using the function decorations.</p>
</dd></dl>

<dl class="function">
<dt id="IPython.core.magic_arguments.parse_argstring">
<tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">parse_argstring</tt><big>(</big><em>magic_func</em>, <em>argstring</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.parse_argstring" title="Permalink to this definition">¶</a></dt>
<dd><p>Parse the string of arguments for the given magic function.</p>
</dd></dl>

<dl class="function">
<dt id="IPython.core.magic_arguments.real_name">
<tt class="descclassname">IPython.core.magic_arguments.</tt><tt class="descname">real_name</tt><big>(</big><em>magic_func</em><big>)</big><a class="headerlink" href="#IPython.core.magic_arguments.real_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Find the real name of the magic.</p>
</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.html" title="Module: core.magics"
             >next</a> |</li>
        <li class="right" >
          <a href="IPython.core.magic.html" title="Module: core.magic"
             >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 Sep 02, 2015.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>