[Python-Dev] os.path.diff(path1, path2)

Trent Mick trentm at ActiveState.com
Thu Sep 15 17:38:40 CEST 2005


[Greg Ewing wrote]
> Nathan Bullock wrote:
> > I find that I quite often want a
> > function that will give me a relative path from path A
> > to path B. I have created such a function, but it
> > would be nice if it was in the standard library.
> 
> +1 from me. It's a fairly common thing to want to do.

If this *does* get added (I'm +0) then let's call it "relpath" or
"relpathto" as in the various implementations out there:

    http://www.jorendorff.com/articles/python/path/
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/302594
    http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/208993

Trent

-- 
Trent Mick
TrentM at ActiveState.com


More information about the Python-Dev mailing list