Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
examples.html 6.12 KiB

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>examples &#8212; binary_c-python  documentation</title>
    <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="binaryc_python_utils" href="modules.html" />
    <link rel="prev" title="Python module for binary_c" href="readme_link.html" />
   
  <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="examples">
<h1>examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h1>
<p>This chapter serves to document several of the example usages</p>
<span class="target" id="module-examples.examples"></span><dl class="function">
<dt id="examples.examples.run_example_binary">
<code class="sig-prename descclassname">examples.examples.</code><code class="sig-name descname">run_example_binary</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#examples.examples.run_example_binary" title="Permalink to this definition">¶</a></dt>
<dd><p>Function to run a binary system. Very basic approach which directly adresses the run_binary(..) python-c wrapper function.</p>
</dd></dl>

<dl class="function">
<dt id="examples.examples.run_example_binary_with_custom_logging">
<code class="sig-prename descclassname">examples.examples.</code><code class="sig-name descname">run_example_binary_with_custom_logging</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#examples.examples.run_example_binary_with_custom_logging" title="Permalink to this definition">¶</a></dt>
<dd><p>Function that will use a automatically generated piece of logging code. Compile it, load it 
into memory and run a binary system. See run_system on how several things are done in the background here.</p>
</dd></dl>

<dl class="function">
<dt id="examples.examples.run_example_binary_with_run_system">
<code class="sig-prename descclassname">examples.examples.</code><code class="sig-name descname">run_example_binary_with_run_system</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#examples.examples.run_example_binary_with_run_system" title="Permalink to this definition">¶</a></dt>
<dd><p>This function serves as an example on the function run_system and parse_output. 
There is more functionality with this method and several tasks are done behind the scene.</p>
<p>Requires pandas, numpy to run.</p>
<p>run_system: mostly just makes passing arguments to the function easier. It also loads all the necessary defaults in the background
parse_output: Takes the raw output of binary_c and selects those lines that start with the given header. 
Note, if you dont use the custom_logging functionality binary_c should be configured to have output that starts with that given header</p>
</dd></dl>

<dl class="function">
<dt id="examples.examples.run_example_binary_with_writing_logfile">
<code class="sig-prename descclassname">examples.examples.</code><code class="sig-name descname">run_example_binary_with_writing_logfile</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#examples.examples.run_example_binary_with_writing_logfile" title="Permalink to this definition">¶</a></dt>
<dd><p>Same as above but when giving the log_filename argument the log filename will be written</p>
</dd></dl>

</div>

          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="index.html">binary_c-python</a></h1>








<h3>Navigation</h3>
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="readme_link.html">Python module for binary_c</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">binaryc_python_utils</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="index.html">Documentation overview</a><ul>
      <li>Previous: <a href="readme_link.html" title="previous chapter">Python module for binary_c</a></li>
      <li>Next: <a href="modules.html" title="next chapter">binaryc_python_utils</a></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2019, Jeff Andrews, Robert Izzard, David Hendriks.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.2.1</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="_sources/examples.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>