Python: list files in the current directory ONLY
<p>In Python, I only want to list all the files in the current directory ONLY. I do not want files listed from any subdirectory or parent.</p>

<p>There do seem to be similar solutions out there, but they don't seem to work for me. Here's my code snippet:</p>

<pre><code>import os
for subdir, dirs, files in os.walk('./'):
    for file in files:
      do some stuff
      print file
</code></pre>

<p>Let's suppose I have 2 files, holygrail.py and Tim inside my current directory. I have a folder aswell and it contains two files (let's call them Arthur and Lancelot) inside it. When I run the script, this is what I get:</p>

<pre><code>holygrail.py
Tim
Arthur
Lancelot
</code></pre>

<p>I am happy with holygrail.py and Tim. But the two files, Arthur and Lancelot, I do not want listed.</p>
