Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed1.swip.net!uio.no!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!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: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.01; 'subject:not': 0.03; 'here?': 0.09; 'cc:addr:python-list': 0.11; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'roy': 0.16; 'subject: \n ': 0.16; 'wrote:': 0.18; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '(see': 0.26; 'header:In-Reply- To:1': 0.27; 'wonder': 0.29; 'subject:that': 0.31; 'charset:us- ascii': 0.36; 'subject:?': 0.36; 'behind': 0.37; 'smith': 0.68; 'received:50.22': 0.84; 'scenes': 0.84; 'subject:Test': 0.84; 'subject:very': 0.91 Date: Thu, 7 Aug 2014 07:05:21 -0500 From: Tim Chase To: Roy Smith Subject: Re: Test for an empty directory that could be very large if it is not empty? In-Reply-To: References: X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com Cc: python-list@python.org 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: 7 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1407413212 news.xs4all.nl 2829 [2001:888:2000:d::a6]:56630 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:75846 On 2014-08-07 07:54, Roy Smith wrote: > I wonder if glob.iglob('*') might help here? My glob.iglob() uses os.listdir() behind the scenes (see glob1() in glob.py) -tkc