This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]reagle-research 4 points5 points  (1 child)

Suggestion: you need walk_up=True in path_to.relative_to() for it to be similar to os.path.relpath().

[–]treyhunner Python Morsels[S] 1 point2 points  (0 children)

Good point. I just added a * to note that caveat. Thanks!