summaryrefslogtreecommitdiffstats
path: root/Lib/plat-riscos
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-17 15:16:09 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-17 15:16:09 (GMT)
commit83eeef4b067b7182778581c9fdfb104492647bd4 (patch)
treec2edf75165c4ae1d928954315ee4fb83545fa9f7 /Lib/plat-riscos
parent3065c94f373ed32922374a04923f21d41ca0a726 (diff)
downloadcpython-83eeef4b067b7182778581c9fdfb104492647bd4.zip
cpython-83eeef4b067b7182778581c9fdfb104492647bd4.tar.gz
cpython-83eeef4b067b7182778581c9fdfb104492647bd4.tar.bz2
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'
Diffstat (limited to 'Lib/plat-riscos')
-rw-r--r--Lib/plat-riscos/riscospath.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/plat-riscos/riscospath.py b/Lib/plat-riscos/riscospath.py
index 32f39ba..8eda834 100644
--- a/Lib/plat-riscos/riscospath.py
+++ b/Lib/plat-riscos/riscospath.py
@@ -315,6 +315,10 @@ def abspath(p):
return normpath(join(os.getcwd(), p))
+# realpath is a no-op on systems without islink support
+realpath = abspath
+
+
# Normalize a path. Only special path element under RISC OS is "^" for "..".
def normpath(p):