Popular Python recipes tagged "relative"http://code.activestate.com/recipes/langs/python/tags/relative/2011-04-11T13:02:32-07:00ActiveState Code RecipesRelative path from one directory to another without explicit string functions (unix only) (Python) 2011-04-11T13:02:32-07:00Denis Barmenkovhttp://code.activestate.com/recipes/users/57155/http://code.activestate.com/recipes/577356-relative-path-from-one-directory-to-another-withou/ <p style="color: grey"> Python recipe 577356 by <a href="/recipes/users/57155/">Denis Barmenkov</a> (<a href="/recipes/tags/path/">path</a>, <a href="/recipes/tags/relative/">relative</a>, <a href="/recipes/tags/unix/">unix</a>). Revision 4. </p> <p>I saw a <a href="http://code.activestate.com/recipes/208993/">recipe 208993</a> messed up with os.sep and '../' and decide to write near-pure-Python version. os.sep used in string expressions only for testing for root directory.</p> <p>Function deal with Unix paths (root: "/"), Windows systems are not supported (root: "C:\").</p>