Browse Source

Path

pull/79/head
Jure Šorn 4 years ago
parent
commit
de13783e2e
2 changed files with 2 additions and 2 deletions
  1. 2
      README.md
  2. 2
      index.html

2
README.md

@ -1640,8 +1640,8 @@ from pathlib import Path
```python
<Path> = Path() # Returns relative cwd. Also Path('.').
<Path> = Path.cwd() # Returns absolute cwd. Also Path().resolve().
<Path> = <Path>.resolve() # Returns absolute Path without symlinks.
<Path> = Path.home() # Returns user's home directory.
<Path> = Path(__file__).resolve() # Returns script's path if cwd wasn't changed.
```
```python

2
index.html

@ -1518,8 +1518,8 @@ value = args.&lt;name&gt;
</code></pre>
<pre><code class="python language-python hljs">&lt;Path&gt; = Path() <span class="hljs-comment"># Returns relative cwd. Also Path('.').</span>
&lt;Path&gt; = Path.cwd() <span class="hljs-comment"># Returns absolute cwd. Also Path().resolve().</span>
&lt;Path&gt; = &lt;Path&gt;.resolve() <span class="hljs-comment"># Returns absolute Path without symlinks.</span>
&lt;Path&gt; = Path.home() <span class="hljs-comment"># Returns user's home directory.</span>
&lt;Path&gt; = Path(__file__).resolve() <span class="hljs-comment"># Returns script's path if cwd wasn't changed.</span>
</code></pre>
<pre><code class="python language-python hljs">&lt;Path&gt; = &lt;Path&gt;.parent <span class="hljs-comment"># Returns Path without final component.</span>
&lt;str&gt; = &lt;Path&gt;.name <span class="hljs-comment"># Returns final component as a string.</span>

Loading…
Cancel
Save