Skip to content

Commit 6b58769

Browse files
committed
Command execution
1 parent 03fe5e2 commit 6b58769

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,19 +1589,19 @@ Command Execution
15891589

15901590
```python
15911591
import os
1592-
os.chdir(<path>) # Changes the current working directory.
1593-
<str> = os.getcwd() # Returns current working directory.
1592+
os.chdir(<path>) # Changes the current working directory.
1593+
<str> = os.getcwd() # Returns current working directory.
15941594
```
15951595

15961596
```python
1597-
os.remove(<path>) # Deletes the file.
1598-
os.rmdir(<path>) # Deletes empty directory.
1599-
shutil.rmtree(<path>) # Deletes an entire directory tree.
1597+
os.remove(<path>) # Deletes the file.
1598+
os.rmdir(<path>) # Deletes empty directory.
1599+
shutil.rmtree(<path>) # Deletes an entire directory tree.
16001600
```
16011601

16021602
```python
1603-
os.rename(from, to) # Renames the file or directory.
1604-
os.replace(from, to) # Same, but overwrites 'to' if it exists.
1603+
os.rename(from, to) # Renames the file or directory.
1604+
os.replace(from, to) # Same, but overwrites 'to' if it exists.
16051605
```
16061606

16071607
```python

index.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1431,15 +1431,15 @@ <h3 id="filesanddirectoriescommands">Files and Directories Commands</h3>
14311431
<li><strong>All exceptions are either 'OSError' or its subclasses.</strong></li>
14321432
</ul>
14331433
<pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> os
1434-
os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory.</span>
1435-
&lt;str&gt; = os.getcwd() <span class="hljs-comment"># Returns current working directory.</span>
1434+
os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory.</span>
1435+
&lt;str&gt; = os.getcwd() <span class="hljs-comment"># Returns current working directory.</span>
14361436
</code></pre>
1437-
<pre><code class="python language-python hljs">os.remove(&lt;path&gt;) <span class="hljs-comment"># Deletes the file.</span>
1438-
os.rmdir(&lt;path&gt;) <span class="hljs-comment"># Deletes empty directory.</span>
1439-
shutil.rmtree(&lt;path&gt;) <span class="hljs-comment"># Deletes an entire directory tree.</span>
1437+
<pre><code class="python language-python hljs">os.remove(&lt;path&gt;) <span class="hljs-comment"># Deletes the file.</span>
1438+
os.rmdir(&lt;path&gt;) <span class="hljs-comment"># Deletes empty directory.</span>
1439+
shutil.rmtree(&lt;path&gt;) <span class="hljs-comment"># Deletes an entire directory tree.</span>
14401440
</code></pre>
1441-
<pre><code class="python language-python hljs">os.rename(<span class="hljs-keyword">from</span>, to) <span class="hljs-comment"># Renames the file or directory.</span>
1442-
os.replace(<span class="hljs-keyword">from</span>, to) <span class="hljs-comment"># Same, but overwrites 'to' if it exists.</span>
1441+
<pre><code class="python language-python hljs">os.rename(<span class="hljs-keyword">from</span>, to) <span class="hljs-comment"># Renames the file or directory.</span>
1442+
os.replace(<span class="hljs-keyword">from</span>, to) <span class="hljs-comment"># Same, but overwrites 'to' if it exists.</span>
14431443
</code></pre>
14441444
<pre><code class="python language-python hljs">os.mkdir(&lt;path&gt;, mode=<span class="hljs-number">0o777</span>) <span class="hljs-comment"># Creates a directory.</span>
14451445
&lt;iter&gt; = os.scandir(path=<span class="hljs-string">'.'</span>) <span class="hljs-comment"># Returns os.DirEntry objects located at path.</span>

0 commit comments

Comments
 (0)