-def getAbsPath(absfile, relfile):
- """When an absfile is given and a relfile is given by
- relative paths relative to absfile, determine the abs
- path of relfile"""
-
- #Get directories except for "." parts
- relsplit = filter(lambda x: x!=".", string.split(relfile, os.sep))
- #Get the directories of absfile withouth the trailing filename
- abssplit = string.split(absfile, os.sep)[:-1]
-
- #Determine number of ".." and remove them
- up=0
- while relsplit[0] == "..":
- up += 1
- del relsplit[0]
- del abssplit[-1]