En Fri, 30 Jan 2009 14:30:53 -0200, eliben <eli...@gmail.com> escribió:

I'm having a problem with 2.6's new os.path.relpath function.

This is correct:

relpath(r'd:\abc\jho', r'd:\abc')
=> 'jho'

But this isn't:
relpath(r'd:\jho', r'd:\\')
=> '..\jho'

Looks like a real bug to me -- please submit it to http://bugs.python.org/

Neither is this:
relpath(r'd:\jho', r'd:')
=> '..\..\..\jho'

d: means "the current directory on drive d:", and it could be something like d:\a\b\c

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to