Browse Source

Paths

pull/102/merge
Jure Šorn 3 weeks ago
parent
commit
e76785f559
2 changed files with 4 additions and 4 deletions
  1. 2
      README.md
  2. 6
      index.html

2
README.md

@ -1697,7 +1697,7 @@ from pathlib import Path
```
```python
<str> = str(<Path>) # Returns path as a string.
<str> = str(<Path>) # Returns path as str. Also <Path>.as_uri().
<file> = open(<Path>) # Also <Path>.read/write_text/bytes(<args>).
```

6
index.html

@ -56,7 +56,7 @@
<body>
<header>
<aside>May 12, 2025</aside>
<aside>May 13, 2025</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</header>
@ -1442,7 +1442,7 @@ args = p.parse_args() <span class="h
<pre><code class="python language-python hljs">&lt;iter&gt; = &lt;Path&gt;.iterdir() <span class="hljs-comment"># Returns directory contents as Path objects.</span>
&lt;iter&gt; = &lt;Path&gt;.glob(<span class="hljs-string">'&lt;pattern&gt;'</span>) <span class="hljs-comment"># Returns Paths matching the wildcard pattern.</span>
</code></pre>
<pre><code class="python language-python hljs">&lt;str&gt; = str(&lt;Path&gt;) <span class="hljs-comment"># Returns path as a string.</span>
<pre><code class="python language-python hljs">&lt;str&gt; = str(&lt;Path&gt;) <span class="hljs-comment"># Returns path as str. Also &lt;Path&gt;.as_uri().</span>
&lt;file&gt; = open(&lt;Path&gt;) <span class="hljs-comment"># Also &lt;Path&gt;.read/write_text/bytes(&lt;args&gt;).</span>
</code></pre>
<div><h2 id="oscommands"><a href="#oscommands" name="oscommands">#</a>OS Commands</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> os, shutil, subprocess
@ -2945,7 +2945,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active
<footer>
<aside>May 12, 2025</aside>
<aside>May 13, 2025</aside>
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
</footer>

Loading…
Cancel
Save