[Python-Dev] os.path.diff(path1, path2)
Delaney, Timothy (Tim)
tdelaney at avaya.com
Tue Sep 20 04:36:42 CEST 2005
Greg Ewing wrote:
> Matthias Andreas Benkard wrote:
>> /home -> usr/home
>> What does os.path.diff("/home/", "/usr/") yield? "../usr/", I would
>> presume? But that's obviously wrong:
> IMO, the relpath method should just work textually on
> the pathnames. It's up to the user to ensure it makes
> sense to do so, e.g. by resolving symlinks beforehand
> if necessary.
In addition, I would presume that relpath would just return the absolute
path if passed an absolute path as the second parameter.
So the above would simply return "/usr/" IMO.
More information about the Python-Dev