If I call os.stat() on a broken symlink, python throws an OSError exception. This makes it useful for finding them. However, there are
os.stat()
symlink
OSError
os.path
You may try using realpath() to get what the symlink points to, then trying to determine if it's a valid file using is file.
(I'm not able to try that out at the moment, so you'll have to play around with it and see what you get)