Re: iglob performance no better than glob

2010-01-31 Thread Kyp
On Jan 31, 2:44 pm, Peter Otten <__pete...@web.de> wrote: > Kyp wrote: > > I have a dir with a large # of files that I need to perform operations > > on, but only needing to access a subset of the files, i.e. the first > > 100 files. > > > Using glob is ver

Re: iglob performance no better than glob

2010-01-31 Thread Kyp
On Jan 31, 1:06 pm, John Bokma wrote: > Kyp writes: > > Is there a way to get the first X # of files from a dir with lots of > > files, that does not take a long time to run? > > Assuming Linux: what does time > >  ls thedir | head > > give? > > with th

iglob performance no better than glob

2010-01-31 Thread Kyp
I have a dir with a large # of files that I need to perform operations on, but only needing to access a subset of the files, i.e. the first 100 files. Using glob is very slow, so I ran across iglob, which returns an iterator, which seemed just like what I wanted. I could iterate over the files tha