

def _clean_win_chars(string):
    'Windows cannot encode some characters in filename.'
    import urllib
    if hasattr(urllib, 'quote'):
        quote = urllib.quote
    else:
        import urllib.parse
        quote = urllib.parse.quote
    for char in ('<', '>', '!', ':', '\\'):
        string = string.replace(char, quote(char))
    return string

dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/externals/joblib/func_inspect.py _clean_win_chars/original