Skip to content

Commit 2d08cb5

Browse files
committed
Open, Paths
1 parent 20f7799 commit 2d08cb5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1600,7 +1600,7 @@ Open
16001600
```
16011601

16021602
```python
1603-
<file>.write(<str/bytes>) # Writes a string or bytes object.
1603+
<file>.write(<str/bytes>) # Writes a string or bytes object to the file.
16041604
<file>.writelines(<collection>) # Writes a coll. of strings or bytes objects.
16051605
<file>.flush() # Flushes write buffer. Runs every 4096/8192 B.
16061606
<file>.close() # Closes the file after flushing write buffer.
@@ -1707,7 +1707,7 @@ import os, shutil, subprocess
17071707
```
17081708

17091709
```python
1710-
os.chdir(<path>) # Changes the current working directory.
1710+
os.chdir(<path>) # Changes the current working directory (CWD).
17111711
os.mkdir(<path>, mode=0o777) # Creates a directory. Permissions are in octal.
17121712
os.makedirs(<path>, mode=0o777) # Creates all path's dirs. Also `exist_ok=False`.
17131713
```

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
<body>
5858
<header>
59-
<aside>May 1, 2025</aside>
59+
<aside>May 2, 2025</aside>
6060
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
6161
</header>
6262

@@ -1371,7 +1371,7 @@
13711371
&lt;list&gt; = &lt;file&gt;.readlines() <span class="hljs-comment"># Returns a list of remaining lines.</span>
13721372
&lt;str/bytes&gt; = next(&lt;file&gt;) <span class="hljs-comment"># Returns a line using buffer. Do not mix.</span>
13731373
</code></pre>
1374-
<pre><code class="python language-python hljs">&lt;file&gt;.write(&lt;str/bytes&gt;) <span class="hljs-comment"># Writes a string or bytes object.</span>
1374+
<pre><code class="python language-python hljs">&lt;file&gt;.write(&lt;str/bytes&gt;) <span class="hljs-comment"># Writes a string or bytes object to the file.</span>
13751375
&lt;file&gt;.writelines(&lt;collection&gt;) <span class="hljs-comment"># Writes a coll. of strings or bytes objects.</span>
13761376
&lt;file&gt;.flush() <span class="hljs-comment"># Flushes write buffer. Runs every 4096/8192 B.</span>
13771377
&lt;file&gt;.close() <span class="hljs-comment"># Closes the file after flushing write buffer.</span>
@@ -1443,7 +1443,7 @@
14431443
<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
14441444
</code></pre></div>
14451445

1446-
<pre><code class="python language-python hljs">os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory.</span>
1446+
<pre><code class="python language-python hljs">os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory (CWD).</span>
14471447
os.mkdir(&lt;path&gt;, mode=<span class="hljs-number">0o777</span>) <span class="hljs-comment"># Creates a directory. Permissions are in octal.</span>
14481448
os.makedirs(&lt;path&gt;, mode=<span class="hljs-number">0o777</span>) <span class="hljs-comment"># Creates all path's dirs. Also `exist_ok=False`.</span>
14491449
</code></pre>
@@ -2940,7 +2940,7 @@ <h3 id="format-2">Format</h3><div><h4 id="forstandardtypesizesandmanualalignment
29402940

29412941

29422942
<footer>
2943-
<aside>May 1, 2025</aside>
2943+
<aside>May 2, 2025</aside>
29442944
<a href="https://gto76.github.io" rel="author">Jure Šorn</a>
29452945
</footer>
29462946

0 commit comments

Comments
 (0)