Re: Walking The Right Path

2007-01-08 Thread Tim Daneliuk
Peter Otten wrote: > Tim Daneliuk wrote: > >> IOW, is there a way to return a symlink-based path which contains >> the symlink pointer as is was *defined* not as it expands? > > os.readlink() > > Peter Thanks - I couldn't find it because it was right in front of my nose :) -- ---

Re: Walking The Right Path

2007-01-08 Thread Peter Otten
Tim Daneliuk wrote: > IOW, is there a way to return a symlink-based path which contains > the symlink pointer as is was *defined* not as it expands? os.readlink() Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Walking The Right Path

2007-01-08 Thread Tim Daneliuk
Tim Daneliuk wrote: > Jakub Stolarski wrote: >> Tim Daneliuk napisal(a): >>> IOW, is there a way to return a symlink-based path which contains >>> the symlink pointer as is was *defined* not as it expands? >>> >> >> One way (but very ugly): >> print os.path._resolve_link('/bar') >> > > Yup, that

Re: Walking The Right Path

2007-01-08 Thread Tim Daneliuk
Jakub Stolarski wrote: > Tim Daneliuk napisal(a): >> Ah yes, moral philosophy and python all come together... Er, that is to day: >> >> Imagine you have this situation on a *nix filesystem: >> >> Symlink A: /foo -> /usr/home >> Symlink B: /bar -> /foo/username >> >> >> If I do this: >> >>impo

Re: Walking The Right Path

2007-01-08 Thread Jakub Stolarski
Tim Daneliuk napisal(a): > Ah yes, moral philosophy and python all come together... Er, that is to day: > > Imagine you have this situation on a *nix filesystem: > > Symlink A: /foo -> /usr/home > Symlink B: /bar -> /foo/username > > > If I do this: > >import os >print os.path.realpath("/