add tui module and example, add contex manager cd and the method run_file in helper

import vendor modules only once during import

change text color for the method cad_wireframe in geometry_plot_pylab and add hide key
This commit is contained in:
2020-01-13 10:25:33 +01:00
parent 4fc4903dc2
commit 033cb92dc4
28 changed files with 1848 additions and 165 deletions

View File

@@ -43,6 +43,41 @@
</dd>
</dl>
<span class="target" id="module-helper"></span><dl class="class">
<dt id="pylib.helper.cd">
<em class="property">class </em><code class="sig-name descname">cd</code><span class="sig-paren">(</span><em class="sig-param">new_path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylib/helper.html#cd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylib.helper.cd" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></p>
<p>Context manager for changing the current working directory</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>new_path</strong> (<em>string</em>) the directory to change into</p>
</dd>
<dt class="field-even">Example</dt>
<dd class="field-even"><p></p></dd>
</dl>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># enter the directory and run some code:</span>
<span class="k">with</span> <span class="n">cd</span><span class="p">(</span><span class="s2">&quot;~/tmp&quot;</span><span class="p">):</span>
<span class="c1"># we are now in ~/tmp</span>
<span class="c1"># code</span>
<span class="c1"># outside the context manager we are back where we started.</span>
</pre></div>
</div>
</dd></dl>
<dl class="function">
<dt id="pylib.helper.run_file">
<code class="sig-name descname">run_file</code><span class="sig-paren">(</span><em class="sig-param">file_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylib/helper.html#run_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylib.helper.run_file" title="Permalink to this definition"></a></dt>
<dd><p>Run a file.</p>
<p>Inside a pythin interpreter it changes to the directory of the
file and after excuting the file it changes back to the working
directory before.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>file_name</strong> (<em>string</em>) the file to execute</p>
</dd>
</dl>
</dd></dl>
<dl class="class">
<dt id="pylib.helper.timeit">
<em class="property">class </em><code class="sig-name descname">timeit</code><span class="sig-paren">(</span><em class="sig-param">description=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pylib/helper.html#timeit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pylib.helper.timeit" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">contextlib.ContextDecorator</span></code></p>