Sophie

Sophie

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

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: utils.sysinfo &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: utils.syspathcontext" href="IPython.utils.syspathcontext.html" />
    <link rel="prev" title="Module: utils.submodule" href="IPython.utils.submodule.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.utils.syspathcontext.html" title="Module: utils.syspathcontext"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="IPython.utils.submodule.html" title="Module: utils.submodule"
             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">utils.sysinfo</span></tt></a><ul>
<li><a class="reference internal" href="#functions">5 Functions</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="IPython.utils.submodule.html"
                        title="previous chapter">Module: <tt class="docutils literal"><span class="pre">utils.submodule</span></tt></a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="IPython.utils.syspathcontext.html"
                        title="next chapter">Module: <tt class="docutils literal"><span class="pre">utils.syspathcontext</span></tt></a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../_sources/api/generated/IPython.utils.sysinfo.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.utils.sysinfo">
<span id="module-utils-sysinfo"></span><h1>Module: <tt class="xref py py-mod docutils literal"><span class="pre">utils.sysinfo</span></tt><a class="headerlink" href="#module-IPython.utils.sysinfo" title="Permalink to this headline">¶</a></h1>
<p>Utilities for getting information about IPython and the system it&#8217;s running in.</p>
<div class="section" id="functions">
<h2>5 Functions<a class="headerlink" href="#functions" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="IPython.utils.sysinfo.pkg_commit_hash">
<tt class="descclassname">IPython.utils.sysinfo.</tt><tt class="descname">pkg_commit_hash</tt><big>(</big><em>pkg_path</em><big>)</big><a class="headerlink" href="#IPython.utils.sysinfo.pkg_commit_hash" title="Permalink to this definition">¶</a></dt>
<dd><p>Get short form of commit hash given directory <cite>pkg_path</cite></p>
<p>We get the commit hash from (in order of preference):</p>
<ul class="simple">
<li>IPython.utils._sysinfo.commit</li>
<li>git output, if we are in a git repository</li>
</ul>
<p>If these fail, we return a not-found placeholder tuple</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>pkg_path</strong> : str</p>
<blockquote>
<div><p>directory containing package
only used for getting commit from active repo</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>hash_from</strong> : str</p>
<blockquote>
<div><p>Where we got the hash from - description</p>
</div></blockquote>
<p><strong>hash_str</strong> : str</p>
<blockquote class="last">
<div><p>short form of hash</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="IPython.utils.sysinfo.pkg_info">
<tt class="descclassname">IPython.utils.sysinfo.</tt><tt class="descname">pkg_info</tt><big>(</big><em>pkg_path</em><big>)</big><a class="headerlink" href="#IPython.utils.sysinfo.pkg_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Return dict describing the context of this package</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>pkg_path</strong> : str</p>
<blockquote>
<div><p>path containing __init__.py for package</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>context</strong> : dict</p>
<blockquote class="last">
<div><p>with named parameters of interest</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="IPython.utils.sysinfo.get_sys_info">
<tt class="descclassname">IPython.utils.sysinfo.</tt><tt class="descname">get_sys_info</tt><big>(</big><big>)</big><a class="headerlink" href="#IPython.utils.sysinfo.get_sys_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Return useful information about IPython and the system, as a dict.</p>
</dd></dl>

<dl class="function">
<dt id="IPython.utils.sysinfo.sys_info">
<tt class="descclassname">IPython.utils.sysinfo.</tt><tt class="descname">sys_info</tt><big>(</big><big>)</big><a class="headerlink" href="#IPython.utils.sysinfo.sys_info" title="Permalink to this definition">¶</a></dt>
<dd><p>Return useful information about IPython and the system, as a string.</p>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre>In [2]: print sys_info()
{&#39;commit_hash&#39;: &#39;144fdae&#39;,      # random
 &#39;commit_source&#39;: &#39;repository&#39;,
 &#39;ipython_path&#39;: &#39;/home/fperez/usr/lib/python2.6/site-packages/IPython&#39;,
 &#39;ipython_version&#39;: &#39;0.11.dev&#39;,
 &#39;os_name&#39;: &#39;posix&#39;,
 &#39;platform&#39;: &#39;Linux-2.6.35-22-generic-i686-with-Ubuntu-10.10-maverick&#39;,
 &#39;sys_executable&#39;: &#39;/usr/bin/python&#39;,
 &#39;sys_platform&#39;: &#39;linux2&#39;,
 &#39;sys_version&#39;: &#39;2.6.6 (r266:84292, Sep 15 2010, 15:52:39) \n[GCC 4.4.5]&#39;}
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="IPython.utils.sysinfo.num_cpus">
<tt class="descclassname">IPython.utils.sysinfo.</tt><tt class="descname">num_cpus</tt><big>(</big><big>)</big><a class="headerlink" href="#IPython.utils.sysinfo.num_cpus" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the effective number of CPUs in the system as an integer.</p>
<p>This cross-platform function makes an attempt at finding the total number of
available CPUs in the system, as returned by various underlying system and
python calls.</p>
<p>If it can&#8217;t find a sensible answer, it returns 1 (though an error <em>may</em> make
it return a large positive number that&#8217;s actually incorrect).</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.utils.syspathcontext.html" title="Module: utils.syspathcontext"
             >next</a> |</li>
        <li class="right" >
          <a href="IPython.utils.submodule.html" title="Module: utils.submodule"
             >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>