def to_posix(path):
    '\n    Return a path using the posix path separator given a path that may contain posix\n    or windows separators, converting \\ to /. NB: this path will still be valid in\n    the windows explorer (except as a UNC or share name). It will be a valid path\n    everywhere in Python. It will not be valid for windows command line operations.\n    '
    is_unicode = isinstance(path, compat.unicode)
    ntpath_sep = ((is_unicode and u'\\') or '\\')
    posixpath_sep = ((is_unicode and u'/') or '/')
    if is_posixpath(path):
        if on_windows:
            return path.replace(ntpath_sep, posixpath_sep)
        else:
            return path
    return path.replace(ntpath_sep, posixpath_sep)
Return a path using the posix path separator given a path that may contain posix
or windows separators, converting \ to /. NB: this path will still be valid in
the windows explorer (except as a UNC or share name). It will be a valid path
everywhere in Python. It will not be valid for windows command line operations.
def to_posix(path):
    '\n    Return a path using the posix path separator given a path that may contain posix\n    or windows separators, converting \\ to /. NB: this path will still be valid in\n    the windows explorer (except as a UNC or share name). It will be a valid path\n    everywhere in Python. It will not be valid for windows command line operations.\n    '
    is_unicode = isinstance(path, compat.unicode)
    ntpath_sep = ((is_unicode and u'\\') or '\\')
    posixpath_sep = ((is_unicode and u'/') or '/')
    if is_posixpath(path):
        if on_windows:
            return path.replace(ntpath_sep, posixpath_sep)
        else:
            return path
    return path.replace(ntpath_sep, posixpath_sep)