Does os.path relpath produce an incorrect relative path?
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu May 25 12:02:45 EDT 2023
On 25/05/23 7:49 pm, BlindAnagram wrote:
> The first of these three results produces an incorrect relative path
> because relpath does not strip off any non-directory tails before
> comparing paths.
It has no way of knowing whether a pathname component is a directory
or not. It's purely an operation on strings, it doesn't look in the
file system.
--
Greg
More information about the Python-list
mailing list