Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!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: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'calls.': 0.07; 'seemed': 0.07; '(without': 0.09; 'subject:files': 0.09; 'underlying': 0.09; 'url:github': 0.09; 'cc:addr:python-list': 0.10; 'file,': 0.15; '(also': 0.16; 'benjamin': 0.16; 'cc:name:python list': 0.16; 'driscoll': 0.16; 'iteration': 0.16; 'os.walk': 0.16; 'sure.': 0.16; 'url:gmane': 0.16; 'url:thread': 0.16; 'wrote:': 0.17; 'discussion': 0.20; 'thanks.': 0.21; "i'd": 0.22; "haven't": 0.23; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'wrote': 0.26; 'am,': 0.27; 'cc:addr:gmail.com': 0.27; 'guess': 0.27; 'separate': 0.27; 'message- id:@mail.gmail.com': 0.27; 'lines': 0.28; 'initial': 0.28; 'noticed': 0.28; 'record': 0.28; 'finds': 0.29; 'remotely': 0.29; "i'm": 0.29; 'december': 0.32; 'url:python': 0.32; 'directory,': 0.33; 'anyone': 0.33; 'entry': 0.33; 'received:google.com': 0.34; 'similar': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'ability': 0.36; 'but': 0.36; 'wanted': 0.36; 'url:org': 0.36; 'useful': 0.36; 'too': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'think': 0.40; 'most': 0.61; 'information': 0.63; 'subject': 0.66; 'goal': 0.74; 'actually,': 0.84; 'oscar': 0.84; 'subject:over': 0.84 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 :cc:content-type; bh=RJCXkTUcs0PCal5An3Ib2N2jvgdUklYa4uhaqre71KI=; b=qk444pDaU1JgZVAzd9/FHYHm0at4OLjEkbJrIyDXxJguudHe3Ieoen27xYRyEksjNW 26FYRoe/Gf+m2vVqJ3DoYd0ydhY8Td+Xo+40inUxXOmiY1hsY5g4+NLSj7onFGG8s5+P +DYZXlS2oH4Oax5t+g0R4gKwnzJ0ngCSHuGZQADj/6Etp1gk1VMN2d+BpuIEzyAd0d8L nsyzutUZP/9AjFGWPvMVquWS0Z8B3LIY+4nZ/ZYgYFqZOxI78XzjDYju5RX9fh7WGGcK 5TpJ5iVUrZTtkKSjqaM9CPxB1efjfBxGbv4RgAV5RGF3NZ8ts+GpfLwk2drE1/H++C6Z o2kQ== MIME-Version: 1.0 In-Reply-To: <50CF6731.3070705@cs.wisc.edu> References: <50CF6731.3070705@cs.wisc.edu> Date: Mon, 17 Dec 2012 19:50:53 +0000 Subject: Re: Re: Iterating over files of a huge directory From: Oscar Benjamin To: Evan Driscoll Content-Type: text/plain; charset=ISO-8859-1 Cc: Gilles Lenfant , Python List 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355773856 news.xs4all.nl 6983 [2001:888:2000:d::a6]:48118 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35008 On 17 December 2012 18:40, Evan Driscoll wrote: > On 12/17/2012 09:52 AM, Oscar Benjamin wrote: >> https://github.com/benhoyt/betterwalk > > This is very useful to know about; thanks. > > I actually wrote something very similar on my own (I wanted to get > information about whether each directory entry was a file, directory, > symlink, etc. without separate stat() calls). The initial goal of betterwalk seemed to be the ability to do os.walk with fewer stat calls. I think the information you want is part of what betterwalk finds "for free" from the underlying OS iteration (without the need to call stat()) but I'm not sure. > (Also just for the record and anyone looking for other posts, I'd guess > said discussion was on Python-dev. I don't look at even remotely > everything on python-list (there's just too much), but I do skim most > subject lines and I haven't noticed any discussion on it before now.) Actually, it was python-ideas: http://thread.gmane.org/gmane.comp.python.ideas/17932 http://thread.gmane.org/gmane.comp.python.ideas/17757