Re: [Tutor] os.path.walk vs unix find command

2008-08-15 Thread Steve Willoughby
Kent Johnson wrote: Is os.popen("find") faster or slower than os.path.walk to find file pattern in the The general answer to "is find faster than os.[path.]walk faster" is "it depends." Find is optimized, compiled, and fast at what it does. However, what it does is somewhat limited. If you

Re: [Tutor] os.path.walk vs unix find command

2008-08-15 Thread Kent Johnson
On Fri, Aug 15, 2008 at 6:17 PM, Angela Yang <[EMAIL PROTECTED]> wrote: > Hi Python gurus: > > Is os.popen("find") faster or slower than os.path.walk to find file pattern > in the > directory tree? I thought os.path.walk would be faster than unix find, but > that doesn't > seem to be the case? In

Re: [Tutor] os.path.walk vs unix find command

2008-08-15 Thread Chris Fuller
On Friday 15 August 2008 17:17, Angela Yang wrote: > Hi Python gurus: > > > > Is os.popen("find") faster or slower than os.path.walk to find file pattern > in the > > directory tree?  I thought os.path.walk would be faster than unix find, but > that doesn't > > seem to be the case? > > > I'd expec

[Tutor] os.path.walk vs unix find command

2008-08-15 Thread Angela Yang
Hi Python gurus: Is os.popen("find") faster or slower than os.path.walk to find file pattern in the directory tree?  I thought os.path.walk would be faster than unix find, but that doesn't seem to be the case? What is the fastest way in python to search for a file with a given pattern in