This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author smheidrich
Recipients smheidrich
Date 2017-06-09.23:55:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za>
In-reply-to
Content
Is there any reason why there is no equivalent of os.readlink in pathlib.Path? Note that Path.resolve does *not* fit the bill, as it always produces an absolute path, whereas readlink just spits out the symlink target exactly the way it is stored, which may be relative to the symlink itself:

>>> import pathlib, os
>>> p = pathlib.Path("/lib64/libc.so.6")
>>> p.resolve()
PosixPath('/lib64/libc-2.24.so')
>>> os.readlink(str(p))
'libc-2.24.so'
History
Date User Action Args
2017-06-09 23:55:59smheidrichsetrecipients: + smheidrich
2017-06-09 23:55:59smheidrichsetmessageid: <1497052559.7.0.422106710991.issue30618@psf.upfronthosting.co.za>
2017-06-09 23:55:59smheidrichlinkissue30618 messages
2017-06-09 23:55:59smheidrichcreate