add inverse of util.os_path for canonical path generation

This commit is contained in:
anatoly techtonik
2015-10-10 16:40:59 +03:00
parent aef2d8cffb
commit 9c53796f87

View File

@@ -39,6 +39,10 @@ SEP = "/"
def os_path(canonicalpath):
return canonicalpath.replace(SEP, path.sep)
def canon_path(nativepath):
"""Return path in OS-independent form"""
return nativepath.replace(path.sep, SEP)
def relative_uri(base, to):
"""Return a relative URL from ``base`` to ``to``."""