<Path> = <Path>.parent <spanclass="hljs-comment"># Returns path without final component.</span>
<file> = open(<Path>) <spanclass="hljs-comment"># Opens the file and returns a file object.</span>
</code></pre>
<div><h2id="commandexecution"><ahref="#commandexecution"name="commandexecution">#</a>Command Execution</h2><div><h3id="filesanddirectories">Files and Directories</h3><ul>
<div><h2id="oscommands"><ahref="#oscommands"name="oscommands">#</a>OS Commands</h2><div><h3id="filesanddirectories">Files and Directories</h3><ul>
<li><strong>Paths can be either strings, Paths, or DirEntry objects.</strong></li>
<li><strong>Functions report OS related errors by raising either OSError or one of its <ahref="#exceptions-1">subclasses</a>.</strong></li>
<div><h2id="csv"><ahref="#csv"name="csv">#</a>CSV</h2><p><strong>Text file format for storing spreadsheets.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> csv
<num> = <mview>[<index>] <spanclass="hljs-comment"># Can be int or float.</span>
<mview> = <mview>[<slice>] <spanclass="hljs-comment"># Mview with rearanged elements.</span>
<mview> = <mview>.cast(<spanclass="hljs-string">'<typecode>'</span>) <spanclass="hljs-comment"># Cast a memoryview to a new format.</span>
<mview>.release() <spanclass="hljs-comment"># Releases the buffer.</span>
<mview> = <mview>.cast(<spanclass="hljs-string">'<typecode>'</span>) <spanclass="hljs-comment"># Casts a memoryview to a new format.</span>
<mview>.release() <spanclass="hljs-comment"># Releases the object's memory buffer.</span>
</code></pre></div>
@ -1943,6 +1944,7 @@ ValueError: malformed node or string