normalize non-existing path using pathlib only

is it possible to normalize a path to a file or directory that does not exist?

Starting from 3.6, it’s the default behavior. See https://docs.python.org/3.6/library/pathlib.html#pathlib.Path.resolve

Path.resolve(strict=False)

If strict is False, the path is resolved as far as possible and any remainder is appended without checking whether it exists

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)