(path: Text)
return path
ensure compatibility with different path separators of Linux and Windows
ensure compatibility with different path separators of Linux and Windows
ensure compatibility with different path separators of Linux and Windows
def ensure_path_sep(path: Text) -> Text:
    """ ensure compatibility with different path separators of Linux and Windows
    """
    if "/" in path:
        path = os.sep.join(path.split("/"))

    if "\\" in path:
        path = os.sep.join(path.split("\\"))

    return path
def ensure_path_sep ( path : Text ) -> Text : if "/" in path : path = os . sep . join ( path . split ( "/" ) ) if "\\" in path : path = os . sep . join ( path . split ( "\\" ) ) return path