eliben wrote:
I'm having a problem with 2.6's new os.path.relpath function.
> ... But this isn't [correct]:
relpath(r'd:\jho', r'd:\\')
=> '..\jho'
Neither is this:
relpath(r'd:\jho', r'd:')
=> '..\..\..\jho'
What am I missing?
There is no way to write a raw string for text ending in a single
backslash. r'd:\\' == 'd:\\\\'
What you want is relpath(r'd:\jho', 'd:\\')
But it turns out this doesn't work, either.
File a bug.
--Scott David Daniels
scott.dani...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list