|
|
@ -54,7 +54,7 @@ |
|
|
|
|
|
|
|
<body> |
|
|
|
<header> |
|
|
|
<aside>February 17, 2022</aside> |
|
|
|
<aside>February 27, 2022</aside> |
|
|
|
<a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
|
|
|
</header> |
|
|
|
|
|
|
@ -1400,7 +1400,7 @@ value = args.<name> |
|
|
|
</code></pre></div> |
|
|
|
|
|
|
|
<pre><code class="python language-python hljs"><Path> = Path(<path> [, ...]) <span class="hljs-comment"># Accepts strings, Paths and DirEntry objects.</span> |
|
|
|
<Path> = <path> / <path> [/ ...] <span class="hljs-comment"># One of the two paths must be a Path object.</span> |
|
|
|
<Path> = <path> / <path> [/ ...] <span class="hljs-comment"># First or second path must be a Path object.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><Path> = Path() <span class="hljs-comment"># Returns relative cwd. Also Path('.').</span> |
|
|
|
<Path> = Path.cwd() <span class="hljs-comment"># Returns absolute cwd. Also Path().resolve().</span> |
|
|
@ -1413,7 +1413,7 @@ value = args.<name> |
|
|
|
<str> = <Path>.suffix <span class="hljs-comment"># Returns final component's extension.</span> |
|
|
|
<tup.> = <Path>.parts <span class="hljs-comment"># Returns all components as strings.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><iter> = <Path>.iterdir() <span class="hljs-comment"># Returns dir contents as Path objects.</span> |
|
|
|
<pre><code class="python language-python hljs"><iter> = <Path>.iterdir() <span class="hljs-comment"># Returns directory contents as Path objects.</span> |
|
|
|
<iter> = <Path>.glob(<span class="hljs-string">'<pattern>'</span>) <span class="hljs-comment"># Returns Paths matching the wildcard pattern.</span> |
|
|
|
</code></pre> |
|
|
|
<pre><code class="python language-python hljs"><str> = str(<Path>) <span class="hljs-comment"># Returns path as a string.</span> |
|
|
@ -2884,7 +2884,7 @@ $ pyinstaller script.py --add-data '<path>:.' <span class="hljs-comment"> |
|
|
|
|
|
|
|
|
|
|
|
<footer> |
|
|
|
<aside>February 17, 2022</aside> |
|
|
|
<aside>February 27, 2022</aside> |
|
|
|
<a href="https://gto76.github.io" rel="author">Jure Šorn</a> |
|
|
|
</footer> |
|
|
|
|
|
|
|