Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: UNSURE 0.319 X-Spam-Level: *** X-Spam-Evidence: '*H*': 0.60; '*S*': 0.23; 'subject:would': 0.07; 'python': 0.11; 'skip:f 30': 0.19; 'seems': 0.21; 'header:In- Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'probably': 0.32; 'to:name:python-list': 0.33; 'received:google.com': 0.35; 'skip:f 40': 0.36; 'subject:?': 0.36; 'skip:& 10': 0.38; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; "you're": 0.61; 'directories:': 0.84; 'subject:you': 0.87; 'directly.': 0.95; 'silent': 0.95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9SeJf1FsNy8xEe6Tqe4ndHiCgrwMt/4UWxixHGAjl1M=; b=GrTjlDFJ9qM2kwxhsNlKKqylshBNG+di2vIiRcJIorZPtdeLriI9MM2Gy76DMIxDkS cELpeDqI6MSsQbLTeV1tG2+kpUi3pHXP7HST6o4iA9crVshSIs+q2eOVNFosEBano4jz MWll/tluftUUyoh2uEiDBG3AgV+U4sQtJphlum6/9wkdgBUlbIp+CQfhDCATe5veDaL/ g7nEC7RBwbzokCqIIvHu8TwNJqrcT2WEbMGKvjpIn6zU/q7xs8WP3dhsj4eoiHAOdwTw C7lnEXHYZvOz7wJ0+n4WkLbQFvfR+U4+Nxny7JOesw/kR/GxP/ceTH6ec80rrM3Ro7xJ 8wYA== MIME-Version: 1.0 X-Received: by 10.180.78.3 with SMTP id x3mr13109687wiw.86.1424411744224; Thu, 19 Feb 2015 21:55:44 -0800 (PST) In-Reply-To: References: Date: Thu, 19 Feb 2015 22:55:44 -0700 Subject: Re: What behavior would you expect? From: Jason Friedman To: python-list Content-Type: multipart/alternative; boundary=f46d0435c078074e6f050f7eb49e X-Mailman-Approved-At: Sun, 22 Feb 2015 11:53:23 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1424602404 news.xs4all.nl 2898 [2001:888:2000:d::a6]:56270 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86095 --f46d0435c078074e6f050f7eb49e Content-Type: text/plain; charset=UTF-8 > If you're going to call listdir, you probably want to use fnmatch directly. > > fnmatch seems to be silent on non-existent directories: python -c 'import fnmatch; fnmatch.fnmatch("/no/such/path", "*")' --f46d0435c078074e6f050f7eb49e Content-Type: text/html; charset=UTF-8

If you're going to call listdir, you probably want to use fnmatch directly.

fnmatch seems to be silent on non-existent directories:
python -c 'import fnmatch; fnmatch.fnmatch("/no/such/path", "*")'

--f46d0435c078074e6f050f7eb49e--