Max Noel wrote: > In any cas, you should try to avoid using file.read without a size > parameter. If you're processing text files, reading them one line at a > time would be a good start (for line in open ('filename.txt'): is an > instance of Best Thing Ever).
Yes, this is good advice, if you can process the file line-by-line that is the best way to do it. If you know you have to handle whole files that won't fit in memory you might want to use the mmap module. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor