Skip to content

Commit a65c3d9

Browse files
committed
OS commands
1 parent 026a976 commit a65c3d9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ from glob import glob
15901590
```
15911591

15921592
```python
1593-
<str> = getcwd() # Returns current working directory.
1593+
<str> = getcwd() # Returns the current working directory.
15941594
<str> = path.join(<path>, ...) # Joins two or more pathname components.
15951595
<str> = path.abspath(<path>) # Returns absolute path.
15961596
```
@@ -1664,15 +1664,15 @@ from pathlib import Path
16641664
OS Commands
16651665
-----------
16661666
### Files and Directories
1667-
* **Paths can be either strings, Paths, or DirEntry objects.**
1667+
* **Paths can be either strings, Paths or DirEntry objects.**
16681668
* **Functions report OS related errors by raising either OSError or one of its [subclasses](#exceptions-1).**
16691669

16701670
```python
16711671
import os, shutil
16721672
```
16731673

16741674
```python
1675-
os.chdir(<path>) # Changes current working directory.
1675+
os.chdir(<path>) # Changes the current working directory.
16761676
os.mkdir(<path>, mode=0o777) # Creates a directory. Mode is in octal.
16771677
```
16781678

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@
14701470
<span class="hljs-keyword">from</span> glob <span class="hljs-keyword">import</span> glob
14711471
</code></pre></div>
14721472

1473-
<pre><code class="python language-python hljs">&lt;str&gt; = getcwd() <span class="hljs-comment"># Returns current working directory.</span>
1473+
<pre><code class="python language-python hljs">&lt;str&gt; = getcwd() <span class="hljs-comment"># Returns the current working directory.</span>
14741474
&lt;str&gt; = path.join(&lt;path&gt;, ...) <span class="hljs-comment"># Joins two or more pathname components.</span>
14751475
&lt;str&gt; = path.abspath(&lt;path&gt;) <span class="hljs-comment"># Returns absolute path.</span>
14761476
</code></pre>
@@ -1517,14 +1517,14 @@
15171517
&lt;file&gt; = open(&lt;Path&gt;) <span class="hljs-comment"># Opens the file and returns file object.</span>
15181518
</code></pre>
15191519
<div><h2 id="oscommands"><a href="#oscommands" name="oscommands">#</a>OS Commands</h2><div><h3 id="filesanddirectories">Files and Directories</h3><ul>
1520-
<li><strong>Paths can be either strings, Paths, or DirEntry objects.</strong></li>
1520+
<li><strong>Paths can be either strings, Paths or DirEntry objects.</strong></li>
15211521
<li><strong>Functions report OS related errors by raising either OSError or one of its <a href="#exceptions-1">subclasses</a>.</strong></li>
15221522
</ul><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> os, shutil
15231523
</code></pre></div></div>
15241524

15251525

15261526

1527-
<pre><code class="python language-python hljs">os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes current working directory.</span>
1527+
<pre><code class="python language-python hljs">os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory.</span>
15281528
os.mkdir(&lt;path&gt;, mode=<span class="hljs-number">0o777</span>) <span class="hljs-comment"># Creates a directory. Mode is in octal.</span>
15291529
</code></pre>
15301530
<pre><code class="python language-python hljs">shutil.copy(from, to) <span class="hljs-comment"># Copies the file. 'to' can be a directory.</span>

0 commit comments

Comments
 (0)