Making a path object with pathlib module like:
pathlib
p = pathlib.Path(\'file.txt\')
The p object will point to some file in
p
pathlib.Path.cwd() / p
This is recommended by CPython core developers as the "one obvious way".
p.resolve() does not return an absolute path for non-existing files on Windows at least.
p.resolve()
p.absolute() is undocumented.
p.absolute()