]> granicus.if.org Git - python/commit
SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:
authorGuido van Rossum <guido@python.org>
Mon, 17 Sep 2001 15:16:09 +0000 (15:16 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 17 Sep 2001 15:16:09 +0000 (15:16 +0000)
commit83eeef4b067b7182778581c9fdfb104492647bd4
treec2edf75165c4ae1d928954315ee4fb83545fa9f7
parent3065c94f373ed32922374a04923f21d41ca0a726
SF patch #461781 by Chris Lawrence: os.path.realpath - Resolve symlinks:

   Once upon a time, I put together a little function
   that tries to find the canonical filename for a given
   pathname on POSIX. I've finally gotten around to
   turning it into a proper patch with documentation.
   On non-POSIX, I made it an alias for 'abspath', as
   that's the behavior on POSIX when no symlinks are
   encountered in the path.

   Example:
   >>> os.path.realpath('/usr/bin/X11/X')
   '/usr/X11R6/bin/X'
Doc/lib/libposixpath.tex
Lib/dospath.py
Lib/macpath.py
Lib/ntpath.py
Lib/plat-riscos/riscospath.py
Lib/posixpath.py