def islink(path):
    """Test whether a path is a symbolic link"""
    try:
        st = os.lstat(path)
    except (os.error, __HOLE__):
        return False
    return stat.S_ISLNK(st.st_mode)

# Being true for dangling symbolic links is also useful.
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/posixpath.py/islink