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