<pre><codeclass="python language-python hljs"><str> = path.basename(<path>) <spanclass="hljs-comment"># Returns final component.</span>
<str> = path.dirname(<path>) <spanclass="hljs-comment"># Returns path without final component.</span>
<tup.> = path.splitext(<path>) <spanclass="hljs-comment"># Splits on last period of final component.</span>
<pre><codeclass="python language-python hljs"><str> = path.basename(<path>) <spanclass="hljs-comment"># Returns final component of the path.</span>
<str> = path.dirname(<path>) <spanclass="hljs-comment"># Returns path without the final component.</span>
<tup.> = path.splitext(<path>) <spanclass="hljs-comment"># Splits on last period of the final component.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><list> = listdir(path=<spanclass="hljs-string">'.'</span>) <spanclass="hljs-comment"># Returns filenames located at path.</span>
<list> = glob(<spanclass="hljs-string">'<pattern>'</span>) <spanclass="hljs-comment"># Returns paths matching the wildcard pattern.</span>
@ -1479,7 +1479,7 @@ value = args.<name>
<pre><codeclass="python language-python hljs"><iter> = scandir(path=<spanclass="hljs-string">'.'</span>) <spanclass="hljs-comment"># Returns DirEntry objects located at path.</span>
<str> = <DirEntry>.path <spanclass="hljs-comment"># Returns path as a string.</span>
<str> = <DirEntry>.name <spanclass="hljs-comment"># Returns final component as a string.</span>
<file> = open(<DirEntry>) <spanclass="hljs-comment"># Opens the file and returns a file object.</span>
<file> = open(<DirEntry>) <spanclass="hljs-comment"># Opens the file and returns file object.</span>