def path_stabilize(filepath):
 newpath = filepath.replace(os.path.sep, SEP)
 if isinstance(newpath, text_type):
  newpath = unicodedata.normalize('NFC', newpath)
 return newpath

def path_stabilize ( filepath ) : newpath = filepath . replace ( os . path . sep , SEP ) if isinstance ( newpath , text_type ) : newpath = unicodedata . normalize ( 'NFC' , newpath ) return newpath
normalize path separater and unicode string .