def sanitize_win_path_string(winpath):
    intab = '<>:|?*'
    outtab = '_' * len(intab)
    trantab = ''.maketrans(intab, outtab) if six.PY3 else string.maketrans(intab, outtab)
    if isinstance(winpath, str):
        winpath = winpath.translate(trantab)
    elif isinstance(winpath, six.text_type):
        winpath = winpath.translate(dict((ord(c), u'_') for c in intab))
    return winpath
Remove illegal path characters for windows
dataset/ETHPy150Open saltstack/salt/salt/utils/__init__.py/sanitize_win_path_string