<array> = array(<spanclass="hljs-string">'<typecode>'</span>, <bytes>) <spanclass="hljs-comment"># Array from bytes object.</span>
<array> = array(<spanclass="hljs-string">'<typecode>'</span>, <bytes>) <spanclass="hljs-comment"># Array from bytes object.</span>
<array> = array(<spanclass="hljs-string">'<typecode>'</span>, <array>) <spanclass="hljs-comment"># Treats array as a sequence of numbers.</span>
<array> = array(<spanclass="hljs-string">'<typecode>'</span>, <array>) <spanclass="hljs-comment"># Treats array as a sequence of numbers.</span>
<div><h3id="decode-2">Decode</h3><pre><codeclass="python language-python hljs"><bin_file>.write(<mview>) <spanclass="hljs-comment"># Writes mview to the binary file.</span>
<bytes> = bytes(<mview>) <spanclass="hljs-comment"># Creates a new bytes object.</span>
<div><h3id="decode-2">Decode</h3><pre><codeclass="python language-python hljs"><bytes> = bytes(<mview>) <spanclass="hljs-comment"># Creates a new bytes object.</span>
<bytes> = <bytes>.join(<coll_of_mviews>) <spanclass="hljs-comment"># Joins mviews using bytes object as sep.</span>
<bytes> = <bytes>.join(<coll_of_mviews>) <spanclass="hljs-comment"># Joins mviews using bytes object as sep.</span>
<array> = array(<spanclass="hljs-string">'<typecode>'</span>, <mview>) <spanclass="hljs-comment"># Treats mview as a sequence of numbers.</span>
<array> = array(<spanclass="hljs-string">'<typecode>'</span>, <mview>) <spanclass="hljs-comment"># Treats mview as a sequence of numbers.</span>
<file>.write(<mview>) <spanclass="hljs-comment"># Writes mview to the binary file.</span>
</code></pre></div>
</code></pre></div>
<pre><codeclass="python language-python hljs"><list> = list(<mview>) <spanclass="hljs-comment"># Returns list of ints or floats.</span>
<pre><codeclass="python language-python hljs"><list> = list(<mview>) <spanclass="hljs-comment"># Returns list of ints or floats.</span>
<div><h2id="curses"><ahref="#curses"name="curses">#</a>Curses</h2><div><h4id="runsabasicfileexplorerintheterminal">Runs a basic file explorer in the terminal:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">from</span> curses <spanclass="hljs-keyword">import</span> wrapper, ascii, A_REVERSE, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_ENTER
<div><h2id="curses"><ahref="#curses"name="curses">#</a>Curses</h2><div><h4id="runsabasicfileexplorerintheterminal">Runs a basic file explorer in the terminal:</h4><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">from</span> curses <spanclass="hljs-keyword">import</span> wrapper, ascii, A_REVERSE, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_ENTER
<spanclass="hljs-keyword">from</span> os <spanclass="hljs-keyword">import</span> listdir, chdir, path
<spanclass="hljs-keyword">from</span> os <spanclass="hljs-keyword">import</span> listdir, path, chdir