title: Get symlink using os.walk
body: <p>I'm using <code>os.walk</code> to traverse my directories. The problem is I want to recognize if a file is a symbolic link, not following through with the link. This code:</p>
  
  <pre><code>for root, dirs, files in os.walk(PROJECT_PATH):
      for f in files:
          # I want os.path.islink(f) to return true for symlink here
          # instead of ignoring them by default
  </code></pre>
  
  <p>will not give me symlinks, while this code</p>
  
  <pre><code>for root, dirs, files in os.walk(PROJECT_PATH, followlinks=True):
      for f in files
  </code></pre>
  
  <p>will walk the directories that the symlinks point to but doesn't give me the symlinks themselves. Thanks.</p>