Introduction
Working with files and directories is natural with most software and something we, as users, do every day, but as a developer, you will quickly find that it can be more complex than expected, especially when multiple platforms have to be supported or encodings are involved.
The Python standard library has many powerful tools to work with files and directories. At first, it might be hard to spot those across the os
, shutil
, stat
, and glob
functions, but once you are aware of all the pieces, it's clear that the standard library provides a great set of tools to work with files and directories.