Python Tutorials - Herong's Tutorial Examples - v2.15, by Herong Yang
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" (source: python.org):
For more readings on "pathlib", read its manual at https://docs.python.org/3/library/pathlib.html.
Table of Contents
Variables, Operations and Expressions
Function Statement and Function Call
List, Set and Dictionary Comprehensions
Packages and Package Directories
►"pathlib" - Object-Oriented Filesystem Paths
"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