[issue14550] os.path.abspath() returns physical path, not logical path.
Antoine Pitrou
report at bugs.python.org
Wed Apr 11 19:22:14 CEST 2012
Antoine Pitrou <pitrou at free.fr> added the comment:
> while abspath() uses getcwd() but because of POSIX.1-2008 (IEEE Std
> 1003.1-2008) says os.getcwd() returns without symbolic links as well,
> so os.path.abspath() == os.path.realpath() near as I can tell.
Just because getcwd() doesn't contain any symbolic links doesn't mean the rest of the path is stripped of all symlinks.
> I think there should be a way in the standard library to get a logical
> path, as well as a realpath().
This doesn't make sense. There could be an arbitrary number of "logical" paths pointing to a single physical one. Which one should Python choose?
----------
nosy: +pitrou
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14550>
_______________________________________
More information about the Python-bugs-list
mailing list