logo


pathlib


<p>The goal of this series of videos is to demonstrate how to deal with files, paths and folders from python programmatically. We'll mainly discuss the python <a href="https://docs.python.org/3/library/pathlib.html#pathlib.Path.replace">pathlib</a> module.</p>


1 - Do Not Hardcode
2 - os.path
3 - pathlib
4 - Path Properties
5 - Making Files
6 - Making Folders
7 - Glob

The code used in this video is listed below.

python code

import json

with open("settings/config.json") as f:
    d = json.loads(f.read())

settings/config.json

{
  "setting": "a",
  "config": "b"
}