Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c79d1ee

Browse filesBrowse files
committed
Update dir structure
1 parent c8ab305 commit c79d1ee
Copy full SHA for c79d1ee
Expand file treeCollapse file tree

28 files changed

+12457
-27
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+23-23Lines changed: 23 additions & 23 deletions
  • Display the source diff
  • Display the rich diff
Large diffs are not rendered by default.
Collapse file

‎notebooks/beginner/html/file_io.html‎

Copy file name to clipboardExpand all lines: notebooks/beginner/html/file_io.html
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11827,7 +11827,7 @@ <h2 id="Working-with-paths">Working with paths<a class="anchor-link" href="#Work
1182711827
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;current directory: </span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">current_dir</span><span class="p">))</span>
1182811828
<span class="c1"># Note: in .py files you can get the dir of current file by os.path.dirname(__file__)</span>
1182911829

11830-
<span class="n">data_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">current_dir</span><span class="p">,</span> <span class="s1">&#39;data&#39;</span><span class="p">)</span>
11830+
<span class="n">data_dir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">current_dir</span><span class="p">),</span> <span class="s1">&#39;data&#39;</span><span class="p">)</span>
1183111831
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;data directory: </span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">data_dir</span><span class="p">))</span>
1183211832
</pre></div>
1183311833

@@ -11845,8 +11845,8 @@ <h2 id="Working-with-paths">Working with paths<a class="anchor-link" href="#Work
1184511845

1184611846

1184711847
<div class="output_subarea output_stream output_stdout output_text">
11848-
<pre>current file: /Users/jerry/github/jerry-git/learn-python3/notebooks/beginner/file_io.ipynb
11849-
current directory: /Users/jerry/github/jerry-git/learn-python3/notebooks/beginner
11848+
<pre>current file: /Users/jerry/github/jerry-git/learn-python3/notebooks/beginner/notebooks/file_io.ipynb
11849+
current directory: /Users/jerry/github/jerry-git/learn-python3/notebooks/beginner/notebooks
1185011850
data directory: /Users/jerry/github/jerry-git/learn-python3/notebooks/beginner/data
1185111851
</pre>
1185211852
</div>
Collapse file
File renamed without changes.
Collapse file
File renamed without changes.
Collapse file
File renamed without changes.
Collapse file
File renamed without changes.
Collapse file
File renamed without changes.
Collapse file

‎notebooks/beginner/file_io.ipynb‎ ‎…tebooks/beginner/notebooks/file_io.ipynb‎notebooks/beginner/file_io.ipynb renamed to notebooks/beginner/notebooks/file_io.ipynb notebooks/beginner/file_io.ipynb renamed to notebooks/beginner/notebooks/file_io.ipynb

Copy file name to clipboardExpand all lines: notebooks/beginner/notebooks/file_io.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"print('current directory: {}'.format(current_dir))\n",
3232
"# Note: in .py files you can get the dir of current file by os.path.dirname(__file__)\n",
3333
"\n",
34-
"data_dir = os.path.join(current_dir, 'data')\n",
34+
"data_dir = os.path.join(os.path.dirname(current_dir), 'data')\n",
3535
"print('data directory: {}'.format(data_dir))"
3636
]
3737
},
Collapse file
File renamed without changes.
Collapse file
File renamed without changes.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.