title: How can I determine if a given directory is `symlink`ed to in Python?
body: <p>I am trying to remove a set of directories, excluding those that are in used and <code>symlink</code>ed to elsewhere.</p>
  
  <p>What is the most effective way to determine if a given directory is <code>symlink</code>ed to?</p>
  
  <p>I've tried <code>os.stat(dir).mt_nlink</code>, but it returns <code>3</code> even for directories I want to remove.</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>By <code>symlinked</code> to I mean this directory is a target of some symlink.</p>