<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
If you're going to call listdir, you probably want to use fnmatch directly.<br>
<br></blockquote></div>fnmatch seems to be silent on non-existent directories:<br>python -c 'import fnmatch; fnmatch.fnmatch("/no/such/path", "*")'<br><br></div></div>