I am having trouble using network addresses. Tried in Python3.6 with Windows. Invoking
os.path.relpath(r"\\ZEYCUS\first\second\file.txt", start=r"\\ZEYCUS\first")
I get 'second\\file.txt'
, as I would expect. But with
os.path.relpath(r"\\ZEYCUS\first\second\file.txt", start=r"\\ZEYCUS")
I get an error message: ValueError: path is on mount '\\\\ZEYCUS\\first', start on mount 'C:'
.
What is going on? Where did the C:
bit come from? How should I use relpath
to obtain 'first\\second\\file.txt'
?