swcarpentry / python-novice-gapminder

Plotting and Programming in Python
http://swcarpentry.github.io/python-novice-gapminder/
Other
163 stars 427 forks source link

Intro to os module #559

Closed izaakm closed 1 year ago

izaakm commented 3 years ago

Addresses issue #554.

Changes:

alee commented 3 years ago

Thanks for the PR! I'm inclined to move the markdown removal into a separate PR so others in the community can chime in on whether they think it's worth removing.

We could also mark it as optional so instructors know to assess their learners when they are teaching and can skip over it if most people know / understand how it works.

Thoughts from others?

martinosorb commented 2 years ago

I'd just like to point out that Pathlib is a new library part of Python's core libraries, and is now considered a much better standard for filesystem operations. Path.cwd(), Path("...").iterdir() can do the same as os.getcwd() and os.listdir(). As for chdir, I personally don't use it and think changing wd tends to cause trouble.