Tech With X
In the first part of this series, we dove into Python path management. Specifically, how to handle imports by understanding absolute and relative paths and using sys.path to resolve import errors. In this follow-up, we’ll explore pathlib and how it can simplify and enhance your path management in Python projects. Let’s get started !
Pathlib Primer 🔗Pathlib is a module in Python’s standard library that provides classes for working with filesystem paths in an object-oriented way, not as strings.
I was recently working on a project, that involved a ton of imports. I found myself overwhelmed by the complexity and frequency of these imports. As you can imagine, this quickly became a headache. This led me to do a deep dive into how Paths are handled in Python
Understanding Paths 🔗A path is a way to specify the location of a file or folder within a system. There are two types of paths.