is there a function that translate relative path ../test.txt into a full path?
example:
the full path is:
/Users/paganotti/Documents/Project/simple/work/paga/
the relative path is:
../test.txt
I want build this result:
/Users/paganotti/Documents/Project/simple/work/test.txt
As you can see translate ../ into “work” folder for build entire path.
Is there general function that acomplish this task?
You can use
normpath()from theos.pathmodule to get a normalize path from one with".."and similar constructs: