What Is "pathlib" Module

This section describes the 'pathlib' module offers classes representing filesystem paths for different operating systems.

What Is "pathlib" Module? - "pathlib" is a Python module that offers classes representing filesystem paths with semantics appropriate for different operating systems.

"pathlib" module offers 2 groups of path classes:

1. Pure paths - Provide purely computational operations without any I/O operations, like manipulating different components of a file path. There are 3 pure path classes:

2. Concrete paths - Extend pure paths to interact actual files pointed by file paths, like creating/deleting files and read/write file contents. There are 3 concrete path classes:

The diagram below shows you relations of "pathlib"

pathlib Module - Class Hierarchy
pathlib Module - Class Hierarchy

For more readings on "pathlib", read its manual at https://docs.python.org/3/library/pathlib.html.

Table of Contents

 About This Book

 Python on macOS Computers

 Python on Linux Computers

 "sys" and "os" Modules

"pathlib" - Object-Oriented Filesystem Paths

What Is "pathlib" Module

 "pathlib.Path" - Path for Both Linux and Windows

 "pathlib.Path" - Read and Write Operations

 "pip" - Package Installer for Python

 SciPy.org - Python Libraries for Science

 pandas - Data Analysis and Manipulation

 Anaconda - Python Environment Manager

 References

 Full Version in PDF/EPUB