Fast File Input
Scott Brady Drummonds
scott.b.drummonds.nospam at intel.com
Wed Feb 25 11:35:43 EST 2004
Hi, everyone,
I'm a relative novice to Python and am trying to reduce the processing time
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 data
(split()). For my large input files, this text processing is taking many
hours.
If I were working in C, I'd consider using a lower level I/O library,
minimizing text processing, and reducing memory redundancy. However, I have
no idea at all what to do to optimize this process in Python.
Can anyone offer some suggestions?
Thanks,
Scott
--
Remove ".nospam" from the user ID in my e-mail to reply via e-mail.
More information about the Python-list
mailing list