diff options
author | anatoly techtonik <techtonik@gmail.com> | 2015-10-10 16:40:59 +0300 |
---|---|---|
committer | anatoly techtonik <techtonik@gmail.com> | 2016-02-09 10:45:11 +0300 |
commit | 9c53796f87e5957744bcc8b990ef8387446b9964 (patch) | |
tree | 681d9c4727e32750f48427a6925d175d6ecd0263 /sphinx/util/osutil.py | |
parent | aef2d8cffba402955f666b9e5447017c5188b411 (diff) | |
download | sphinx-git-9c53796f87e5957744bcc8b990ef8387446b9964.tar.gz |
add inverse of util.os_path for canonical path generation
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r-- | sphinx/util/osutil.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 5bfbcabc4..9177f42c4 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -38,6 +38,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): |