On 16 March 2010 08:28, Steven D'Aprano <st...@pearwood.info> wrote: > On Tue, 16 Mar 2010 10:22:55 am kumar s wrote: >> thanks Benno. >> >> supplying 3.6 GB file is over-kill for the script. > > Then supply a smaller file. > > >> This is the reason I chose to input lines on fly. > > I don't understand what you are trying to say.
I think he thinks that python is going to read the whole 3.6GB of data into memory in one hit, rather than using a small amount of memory to process it line by line. But "for line in datafile" in your code above uses a generator, right? So I don't think it's a problem - correct me if I'm wrong. Thanks, benno. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor