Skip to content

Commit 23c6c41

Browse files
committed
Command execution
1 parent 63fc68d commit 23c6c41

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1597,31 +1597,31 @@ Command Execution
15971597

15981598
```python
15991599
import os
1600-
os.chdir(<path>) # Changes the current working directory.
1601-
<str> = os.getcwd() # Returns current working directory.
1600+
<str> = os.getcwd() # Returns the current working directory.
1601+
os.chdir(<path>) # Changes the current working directory.
16021602
```
16031603

16041604
```python
1605-
os.remove(<path>) # Deletes the file.
1606-
os.rmdir(<path>) # Deletes empty directory.
1607-
shutil.rmtree(<path>) # Deletes an entire directory tree.
1605+
os.remove(<path>) # Deletes the file.
1606+
os.rmdir(<path>) # Deletes empty directory.
1607+
shutil.rmtree(<path>) # Deletes the entire directory tree.
16081608
```
16091609

16101610
```python
1611-
os.rename(from, to) # Renames the file or directory.
1612-
os.replace(from, to) # Same, but overwrites 'to' if it exists.
1611+
os.rename(from, to) # Renames the file or directory.
1612+
os.replace(from, to) # Same, but overwrites 'to' if it exists.
16131613
```
16141614

16151615
```python
1616-
os.mkdir(<path>, mode=0o777) # Creates a directory.
1617-
<iter> = os.scandir(path='.') # Returns os.DirEntry objects located at path.
1616+
os.mkdir(<path>, mode=0o777) # Creates a directory.
1617+
<iter> = os.scandir(path='.') # Returns os.DirEntry objects located at path.
16181618
```
16191619

16201620
#### DirEntry:
16211621
```python
1622-
<str> = <DirEntry>.name # Final component of the path.
1623-
<str> = <DirEntry>.path # Path with final component.
1624-
<Path> = Path(<DirEntry>) # Path object.
1622+
<str> = <DirEntry>.name # Final component of the path.
1623+
<str> = <DirEntry>.path # Path with final component.
1624+
<Path> = Path(<DirEntry>) # Path object.
16251625
```
16261626

16271627
```python

index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,23 +1437,23 @@ <h3 id="filesanddirectoriescommands">Files and Directories Commands</h3>
14371437
<li><strong>All exceptions are either 'OSError' or its subclasses.</strong></li>
14381438
</ul>
14391439
<pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> os
1440-
os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory.</span>
1441-
&lt;str&gt; = os.getcwd() <span class="hljs-comment"># Returns current working directory.</span>
1440+
&lt;str&gt; = os.getcwd() <span class="hljs-comment"># Returns the current working directory.</span>
1441+
os.chdir(&lt;path&gt;) <span class="hljs-comment"># Changes the current working directory.</span>
14421442
</code></pre>
1443-
<pre><code class="python language-python hljs">os.remove(&lt;path&gt;) <span class="hljs-comment"># Deletes the file.</span>
1444-
os.rmdir(&lt;path&gt;) <span class="hljs-comment"># Deletes empty directory.</span>
1445-
shutil.rmtree(&lt;path&gt;) <span class="hljs-comment"># Deletes an entire directory tree.</span>
1443+
<pre><code class="python language-python hljs">os.remove(&lt;path&gt;) <span class="hljs-comment"># Deletes the file.</span>
1444+
os.rmdir(&lt;path&gt;) <span class="hljs-comment"># Deletes empty directory.</span>
1445+
shutil.rmtree(&lt;path&gt;) <span class="hljs-comment"># Deletes the entire directory tree.</span>
14461446
</code></pre>
1447-
<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>
1448-
os.replace(<span class="hljs-keyword">from</span>, to) <span class="hljs-comment"># Same, but overwrites 'to' if it exists.</span>
1447+
<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>
1448+
os.replace(<span class="hljs-keyword">from</span>, to) <span class="hljs-comment"># Same, but overwrites 'to' if it exists.</span>
14491449
</code></pre>
1450-
<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>
1451-
&lt;iter&gt; = os.scandir(path=<span class="hljs-string">'.'</span>) <span class="hljs-comment"># Returns os.DirEntry objects located at path.</span>
1450+
<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>
1451+
&lt;iter&gt; = os.scandir(path=<span class="hljs-string">'.'</span>) <span class="hljs-comment"># Returns os.DirEntry objects located at path.</span>
14521452
</code></pre>
14531453
<h4 id="direntry">DirEntry:</h4>
1454-
<pre><code class="python language-python hljs">&lt;str&gt; = &lt;DirEntry&gt;.name <span class="hljs-comment"># Final component of the path.</span>
1455-
&lt;str&gt; = &lt;DirEntry&gt;.path <span class="hljs-comment"># Path with final component.</span>
1456-
&lt;Path&gt; = Path(&lt;DirEntry&gt;) <span class="hljs-comment"># Path object.</span>
1454+
<pre><code class="python language-python hljs">&lt;str&gt; = &lt;DirEntry&gt;.name <span class="hljs-comment"># Final component of the path.</span>
1455+
&lt;str&gt; = &lt;DirEntry&gt;.path <span class="hljs-comment"># Path with final component.</span>
1456+
&lt;Path&gt; = Path(&lt;DirEntry&gt;) <span class="hljs-comment"># Path object.</span>
14571457
</code></pre>
14581458
<pre><code class="python language-python hljs">&lt;bool&gt; = &lt;DirEntry&gt;.is_file()
14591459
&lt;bool&gt; = &lt;DirEntry&gt;.is_dir()

0 commit comments

Comments
 (0)