title: How can get a list of files in a specific directory ignoring the symbolic links using python?
body: <p>I need to process the filenames from a directory by creating the list of the filenames.
  But my resulting list contains entries for symbolic links too. How can I get pure filenames in a particular directory using python.</p>
  
  <p>I have tried:<code>os.walk,os.listdir,os.path.isfile</code>     </p>
  
  <p>But all are including symbolic links of type <code>'filename~'</code> to the list :(</p>
  
  <p>The    <code>glob.glob</code> adds the path to the list which I don't need.</p>
  
  <p>I need to use it in a code like this:</p>
  
  <pre><code>files=os.listdir(folder)    
  for f in files:
       dosomething(like find similar file f in other folder)
  </code></pre>
  
  <p>Any help? Or please redirect me to the right answer. Thanks</p>
  
  <p>Edit: the tilde sign is at end</p>