diff --git a/doc/html/_modules/promod3/core/helper.html b/doc/html/_modules/promod3/core/helper.html new file mode 100644 index 0000000000000000000000000000000000000000..847a3a085dcbf916abfb88b9e0fdcd688da9a898 --- /dev/null +++ b/doc/html/_modules/promod3/core/helper.html @@ -0,0 +1,120 @@ +<!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>promod3.core.helper — ProMod3 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: '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="ProMod3 0 documentation" href="../../../index.html" /> + <link rel="up" title="Module code" href="../../index.html" /> + </head> + <body> + <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><a href="../../../index.html">ProMod3 0 documentation</a> »</li> + <li><a href="../../index.html" accesskey="U">Module code</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <h1>Source code for promod3.core.helper</h1><div class="highlight"><pre> +<span class="sd">"""</span> +<span class="sd">Uncategorised functions which may come handy at several places.</span> +<span class="sd">"""</span> + +<span class="kn">import</span> <span class="nn">sys</span> +<span class="kn">import</span> <span class="nn">ost</span> + +<div class="viewcode-block" id="MsgErrorAndExit"><a class="viewcode-back" href="../../../core/helper.html#promod3.core.helper.MsgErrorAndExit">[docs]</a><span class="k">def</span> <span class="nf">MsgErrorAndExit</span><span class="p">(</span><span class="n">msg</span><span class="p">,</span> <span class="n">exit_status</span><span class="p">):</span> + <span class="sd">'''</span> +<span class="sd"> Send a messages to the |ost_s| :ost_docs:`error log <base/logging/>` and exit</span> +<span class="sd"> the Python interpreter.</span> + +<span class="sd"> :param msg: The message.</span> +<span class="sd"> :type msg: :class:`str`</span> + +<span class="sd"> :param exit_status: Exit code, ends up in ``$?`` in the shell. ``0`` is</span> +<span class="sd"> traditionally reserved to successful commands.</span> +<span class="sd"> :type exit_status: :class:`int`</span> + +<span class="sd"> :returns: No return value, exits script with value ``exit_status``.</span> +<span class="sd"> '''</span> + <span class="n">ost</span><span class="o">.</span><span class="n">LogError</span><span class="p">(</span><span class="n">msg</span><span class="p">)</span> + <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">exit_status</span><span class="p">)</span> +</div> +<span class="n">__all__</span> <span class="o">=</span> <span class="p">(</span> + <span class="s">'MsgErrorAndExit'</span><span class="p">,</span> +<span class="p">)</span> +</pre></div> + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> +<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="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><a href="../../../index.html">ProMod3 0 documentation</a> »</li> + <li><a href="../../index.html" >Module code</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2013, Bienchen. + Last updated on Oct 16 09:31, 2014. + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3. + </div> + </body> +</html> \ No newline at end of file diff --git a/doc/html/_sources/core/helper.txt b/doc/html/_sources/core/helper.txt new file mode 100644 index 0000000000000000000000000000000000000000..c790f0ab5a8f3c4465f858bcbbd89c5264035444 --- /dev/null +++ b/doc/html/_sources/core/helper.txt @@ -0,0 +1,36 @@ +:mod:`~promod3.core.helper` - Shared functionality for the everything +================================================================================ + +.. currentmodule:: promod3.core.helper + +Introduction +-------------------------------------------------------------------------------- + +We collect functions here, which should be useful in many places but would make +rather empty modules left alone. + + +Messages +-------------------------------------------------------------------------------- + +.. testcode:: helper + :hide: + + from promod3.core import helper + + try: + helper.MsgErrorAndExit("Something failed!", 1) + except SystemExit, e: + if e.code == 1: + pass + else: + raise + +.. doctest:: helper + + from promod3.core import helper + + helper.MsgErrorAndExit("Something failed!", 1) + +.. autofunction:: MsgErrorAndExit + diff --git a/doc/html/core/helper.html b/doc/html/core/helper.html new file mode 100644 index 0000000000000000000000000000000000000000..7af2deb5b156b43f5797d725b631c493be3c54ac --- /dev/null +++ b/doc/html/core/helper.html @@ -0,0 +1,167 @@ +<!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>helper - Shared functionality for the everything — ProMod3 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: '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="ProMod3 0 documentation" href="../index.html" /> + <link rel="up" title="core - ProMod3 core functionality" href="index.html" /> + <link rel="next" title="meld - Coordinate modeling" href="../meld/index.html" /> + <link rel="prev" title="argcheck - Standard tests for command line arguments" href="argcheck.html" /> + </head> + <body> + <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="../meld/index.html" title="meld - Coordinate modeling" + accesskey="N">next</a> |</li> + <li class="right" > + <a href="argcheck.html" title="argcheck - Standard tests for command line arguments" + accesskey="P">previous</a> |</li> + <li><a href="../index.html">ProMod3 0 documentation</a> »</li> + <li><a href="../developers.html" >Documentation For Developes</a> »</li> + <li><a href="index.html" accesskey="U"><tt class="docutils literal"><span class="pre">core</span></tt> - ProMod3 core functionality</a> »</li> + </ul> + </div> + + <div class="document"> + <div class="documentwrapper"> + <div class="bodywrapper"> + <div class="body"> + + <div class="section" id="helper-shared-functionality-for-the-everything"> +<h1><tt class="xref py py-mod docutils literal"><span class="pre">helper</span></tt> - Shared functionality for the everything<a class="headerlink" href="#helper-shared-functionality-for-the-everything" title="Permalink to this headline">¶</a></h1> +<div class="section" id="introduction"> +<h2>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2> +<p>We collect functions here, which should be useful in many places but would make +rather empty modules left alone.</p> +</div> +<div class="section" id="messages"> +<h2>Messages<a class="headerlink" href="#messages" title="Permalink to this headline">¶</a></h2> +<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">promod3.core</span> <span class="kn">import</span> <span class="n">helper</span> + +<span class="n">helper</span><span class="o">.</span><span class="n">MsgErrorAndExit</span><span class="p">(</span><span class="s">"Something failed!"</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> +</pre></div> +</div> +<dl class="function"> +<dt id="promod3.core.helper.MsgErrorAndExit"> +<tt class="descclassname">promod3.core.helper.</tt><tt class="descname">MsgErrorAndExit</tt><big>(</big><em>msg</em>, <em>exit_status</em><big>)</big><a class="reference internal" href="../_modules/promod3/core/helper.html#MsgErrorAndExit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#promod3.core.helper.MsgErrorAndExit" title="Permalink to this definition">¶</a></dt> +<dd><p>Send a messages to the OST <a class="reference external" href="http://www.openstructure.org/docs/1.3/base/logging/">error log</a> and exit +the Python interpreter.</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"><ul class="first simple"> +<li><strong>msg</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#str" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></a>) – The message.</li> +<li><strong>exit_status</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">int</span></tt></a>) – Exit code, ends up in <tt class="docutils literal"><span class="pre">$?</span></tt> in the shell. <tt class="docutils literal"><span class="pre">0</span></tt> is +traditionally reserved to successful commands.</li> +</ul> +</td> +</tr> +<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">No return value, exits script with value <tt class="docutils literal"><span class="pre">exit_status</span></tt>.</p> +</td> +</tr> +</tbody> +</table> +</dd></dl> + +</div> +</div> + + + </div> + </div> + </div> + <div class="sphinxsidebar"> + <div class="sphinxsidebarwrapper"> + <h3><a href="../index.html">Table Of Contents</a></h3> + <ul> +<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">helper</span></tt> - Shared functionality for the everything</a><ul> +<li><a class="reference internal" href="#introduction">Introduction</a></li> +<li><a class="reference internal" href="#messages">Messages</a></li> +</ul> +</li> +</ul> + + <h4>Previous topic</h4> + <p class="topless"><a href="argcheck.html" + title="previous chapter"><tt class="docutils literal"><span class="pre">argcheck</span></tt> - Standard tests for command line arguments</a></p> + <h4>Next topic</h4> + <p class="topless"><a href="../meld/index.html" + title="next chapter"><tt class="docutils literal"><span class="pre">meld</span></tt> - Coordinate modeling</a></p> + <h3>This Page</h3> + <ul class="this-page-menu"> + <li><a href="../_sources/core/helper.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="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="../meld/index.html" title="meld - Coordinate modeling" + >next</a> |</li> + <li class="right" > + <a href="argcheck.html" title="argcheck - Standard tests for command line arguments" + >previous</a> |</li> + <li><a href="../index.html">ProMod3 0 documentation</a> »</li> + <li><a href="../developers.html" >Documentation For Developes</a> »</li> + <li><a href="index.html" ><tt class="docutils literal"><span class="pre">core</span></tt> - ProMod3 core functionality</a> »</li> + </ul> + </div> + <div class="footer"> + © Copyright 2013, Bienchen. + Last updated on Oct 16 09:31, 2014. + Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3. + </div> + </body> +</html> \ No newline at end of file