def normalize_path(path):
 return os.path.normcase(os.path.realpath(os.path.expanduser(path)))

def normalize_path ( path ) : return os . path . normcase ( os . path . realpath ( os . path . expanduser ( path ) ) )
convert a path to its canonical .