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

Veröffentlicht am: 09 Januar 2023
auf dem Kanal: 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...


Auf dieser Seite können Sie das Online-Video Pathlib Module In Python - How To Effectively Use Path Class Of Pathlib Module mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Aparsoft AI 09 Januar 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,175 Mal angesehen und es wurde von 51 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!