Remove certain filetypes in Python
<p>I am running a script that walks a directory structure and generates new files in each folder in the directory. I want to delete some of the files right after creation. This is my idea, but it is quite wrong I imagine:</p>

<pre><code>directory = os.path.dirname(obj)
m = MeshExporterApplication(directory)
os.remove(os.path.join(directory,"*.mesh.xml"))
</code></pre>

<p>How to you put wildcards in a path? I guess not like /home/me/*.txt, but that is what I am trying.</p>

<p>Thanks,
Gareth</p>
