示例#1
0
def is_link_to(path, target):
    def normalize(path):
        return os.path.normcase(os.path.normpath(path))
    return islink(path) and \
        normalize(realpath(path)) == normalize(realpath(target))
示例#2
0
def realpath_expanduser(path):
    return realpath(os.path.expanduser(path))