Pathlib Module In Python - How To Effectively Use Path Class Of Pathlib Module

Опубликовано: 09 Январь 2023
на канале: Aparsoft AI
1,175
51

Pathlib module was introduced in Python 3.4 with PEP 428. It is a part of the Python standard library that provides an object-oriented interface for working with file paths. It allows us to create, manipulate, and operate on file paths in a platform-agnostic way.

Before the introduction to this module in Python, the obvious module to work with files was the OS module, which by the way is still very handy for many useful tasks. But for working with files OS module manipulates the path of the file as pure strings. Whereas the Pathlib module takes an object-oriented approach.

OS Module Tutorial:
   • Python OS Module Tutorial | OS Module | In...  


This is an excellent tutorial to learn:
00:24 - Introduction
00:48 - What is the use of Pathlib
02:18 - List of all methods used with the Path class of pathlib module
02:55 - Manipulating Directories paths
03:32 - Creating a new directory
04:08 - Join Paths
04:58 - Delete directory
05:28 - Manipulating files path
06:42 - Iterating over all files and dirs of a directory
08:55 - Getting metadata of files
12:38 - Reading and writing to the files
14:20 - Deleting a file

Python Projects Playlist:
   • Python Projects For Beginners  

Get all the codes at Github Repos:
https://github.com/CodingMantras?tab=...

Facebook:
Coding Mantras(Cod-Man):   / codingmantras22  

Twitter:
RS Punia:   / codingmantras  

StackOverflow
https://stackoverflow.com/users/14476...


На этой странице сайта вы можете посмотреть видео онлайн Pathlib Module In Python - How To Effectively Use Path Class Of Pathlib Module длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Aparsoft AI 09 Январь 2023, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,175 раз и оно понравилось 51 зрителям. Приятного просмотра!