Fast File Input

Eddie Corns eddie at
Wed Feb 25 21:23:03 CET 2004

>"Scott Brady Drummonds" <scott.b.drummonds.nospam at> wrote in
>message news:c1iit0$2jj$1 at
>> Hi, everyone,
>> I'm a relative novice to Python and am trying to reduce the processing
>> for a very large text file that I am reading into my Python script.  I'm
>> currently reading each line one at a time (readline()), stripping the
>> leading and trailing whitespace (strip()) and splitting it's delimited
>> (split()).  For my large input files, this text processing is taking many
>> hours.

If you mean delimited in the CSV sense then I believe that the CSV modules are
optimised for this.  Included in 2.3 IIRC.


More information about the Python-list mailing list