Stop working so hard on paths. Get started with pathlib!
everydaysuperpowers.dev·30w
📦uv
Preview
Report Post

In version 3.4, python shipped with a new module in the standard library, pathlib . At the time of its release, I remember hearing some fanfare around it, but I didn’t quite understand the point of it. I had only recently stopped adding strings together to create paths to the files and folders I needed to work with, in favor of using the os and os.path modules. It took me a little while to experiment with it and plumb the documentation for useful bits.

Since then, I’ve learned a lot about the pathlib module, and as I have said before, it is my favorite module in the standard library.

While that’s the case, most people I talk to about it are working to hard to access files and folders with python. M…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help