How to exclude files extension from os.walk
<p>I would like to search files, except those which contain .txt file. How to do that ?
At the moment my code is searching for files with .txt extension on it. How to do an opposite?</p>

<pre><code>src = raw_input("Enter source disk location: ")
src = os.path.abspath(src)
print "src---&gt;:",src
for dir,dirs,_ in os.walk(src, topdown=True):

    file_path = glob.glob(os.path.join(dir,"*.txt"))
</code></pre>