Re: efficient text file search -solution

2006-09-12 Thread Sion Arrowsmith
noro <[EMAIL PROTECTED]> wrote: >OK, am not sure why, but > >fList=file('somefile').read() >if fList.find('string') != -1: > print 'FOUND' > >works much much faster. > >it is strange since i thought 'for line in file('somefile')' is >optemized and read pages to the memory, Step back and think ab

efficient text file search -solution

2006-09-11 Thread noro
OK, am not sure why, but fList=file('somefile').read() if fList.find('string') != -1: print 'FOUND' works much much faster. it is strange since i thought 'for line in file('somefile')' is optemized and read pages to the memory, i guess not.. George Sakkis wrote: > noro wrote: > > > Is there