How to Use Pathlib in Python | Quickstart Guide or Beginners

preview_player
Показать описание
`pathlib` is a part of the standard library that helps you deal with file paths. In this video, we explore the library with examples. We also talk about the different `Path` classes that are available to us, and we talk about the relationships between the different classes in the library. And lastly, we talk about some of the caveats of using the library.

00:00 - Intro
00:15 - The `Path` Object
01:28 - Understanding `Path` objects and their inheritance
02:23 - Utility methods and properties on the `Path` object
03:32 - FileExistsError
03:45 - Chaining methods on the `Path` object
04:34 - Finding duplicate files
05:26 - Iterating over directories
06:09 - Matching filenames
06:35 - Deleting files
07:19 - Using Path objects in other libraries
07:31 - Opening files using Path's open method

Links:
Рекомендации по теме
Комментарии
Автор

the most helpful video on the pathlib. I knew the library is good, but I didn't know how it is good and now I DO.

Jihoon
Автор

nice and concise tutorial on pathlib. loved it!

karansmittal
Автор

is that a new feature that auto adds the import statement with code completion...whats settings are needed?

emmanuelezeagwula
Автор

Wow I need to go look at the source for this now to figure out how they are co-opting the math operators like that! If they're doing it in Python then that is clever, but I am suspicious that they are cheating in the compiler.

Emily_Entropy
Автор

It'll be much better if you would do something different than the rest of the talking heads, just do not do 'pwd' or 'Psix path" crap. Make "real-world examples".

vladepast