Is there a clean way to resolve environment variables or %VARIABLES%
in general purely with the Path
class without having to use a fallback solution like os.path.expandvars
or "my/path/%variable%".fortmat(**os.environ)
?
The question How to use win environment variable "pathlib" to save files? doesn't provide an answer. It's exactly the opposite. It suggests using os.path.expandvars
.