Python Tutorial: Pathlib - The Modern Way to Handle File Paths

preview_player
Показать описание

Thank You to the sponsor, Ekster Wallets!
Please use code "SCHAFER" at checkout!

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

#Python #Pathlib
Рекомендации по теме
Комментарии
Автор

Clarification around 6:42… The str() representation of the Pathlib object and the output of the name method are only the same in that specific example because that file and directory live within the top level of the current working directory. These outputs aren't always the same, such as when a file is another level deep. That would cause the str() representation to print out that entire relative path where the name would still just be the file name. You can see this in action at 9:18.

Thanks to Ekster for sponsoring this video! Be sure to use code "SCHAFER" at checkout:

coreyms
Автор

Watching this video brings back memories of my high school days when I learned Python by watching the valuable videos created by Mr. MS Corey, who has been like a teacher to me, even though we never met. I have been using Pathlib for some time now and find it to be a cleaner and better way of handling paths. I watched this tutorial purely for nostalgic reasons. Thank you very much, Mr. MS Corey; you are an amazing teacher.

felicytatomaszewska
Автор

I'm a simple man. when I see a Corey Schafer video, I like and watch. In that order.

abdulmuminakinde
Автор

Always a good day when I see a new video from Corey Schafer. Thank you!!

NipkowDisk
Автор

I used this from time to time, but then always forget how much better it is. This was a great example of why you should move over to pathlib. Thank you! Time to rewrite all my scripts!

cary
Автор

I see a Corey video y press like! No matter what. Love to see you back Corey! Hope you are ok and finally solved all your issues!

nicop
Автор

Ahh good ol' memories of learning Python from Corey, warms my heart to see that you're still making one of the best Python tutorials ever.... once again thanks for everything you've done! :)

chiroyce
Автор

Glad, one of my favorite teachers of all time is back!

NoahElRhandour
Автор

Welcome back corey.. Im now a python developer because of you...

JithinJKumar
Автор

thank you so much for this excellent video and again, great to have you on here again with modern python tutorials!

markslima
Автор

Took me a little while to get into. It’s so much easier than using os.

dgbene
Автор

Continue your good work, Mr.Corey🥰😂😀👍

bismarkasirifiantwi
Автор

Sir i know you are busy with your work and life but its humble request please do consider to make a series on python, updated version
sharing you indepth knowledge of the concept, main aim is if one is to learn python than on which concepts he should focus on the base (foundations) to make way for a brilliant career like yours in python . A humble request sir do consider thanks

darklucifer
Автор

I've never really worked with the os module since my recent introduction to Python. I used the Pathlib module and really enjoyed it for automating my file management tasks and I discovered many more features of it from this video. I definitely don’t have to regret although I have to learn a bit on the other one you proposed

stalinengoma
Автор

It's also fairly easy to modify Paths with the .with_name(), .with_stem() and .with_suffix() methods.

volbla
Автор

it's because os module is working with string that i'm still using os module, since i'm doing a lot of path modification script, with string is really easy to do it, and also couldn't move on from os.walk() that being easily to access and modifying all directories, subd, and files within a single loop.

mdsegara
Автор

Hey Corey, I'm a massive fan!

I see pyspark as a required skill for so many data engineering jobs. Do you have a video on it? If not what are your thoughts on making one?

You're the best!

benjamindale
Автор

I've been really enjoying using pathlib.Path because it provides intuitive operators and methods.
Thank you very much for the comprehensive and well described explanation of this module.

junpyohong
Автор

Your videos are so useful! Could you structure your Python playlist to show what to learn first, second, and so on? That would be helpful for beginners.

sj
Автор

Sir, I like your Python courses, but they are a little old, are you going to record a new Python course?

EircWong