-
- Downloads
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'
Showing
- Doc/lib/libposixpath.tex 7 additions, 0 deletionsDoc/lib/libposixpath.tex
- Lib/dospath.py 3 additions, 0 deletionsLib/dospath.py
- Lib/macpath.py 3 additions, 0 deletionsLib/macpath.py
- Lib/ntpath.py 3 additions, 0 deletionsLib/ntpath.py
- Lib/plat-riscos/riscospath.py 4 additions, 0 deletionsLib/plat-riscos/riscospath.py
- Lib/posixpath.py 21 additions, 0 deletionsLib/posixpath.py
Loading
Please register or sign in to comment