Implementing file reading in C/Python

Sion Arrowsmith siona at
Fri Jan 9 18:41:29 CET 2009

Grant Edwards  <invalid at invalid> wrote:
>On 2009-01-09, Johannes Bauer <dfnsonfsduifb at> wrote:
>> I've come from C/C++ and am now trying to code some Python because I
>> absolutely love the language. However I still have trouble getting
>> Python code to run efficiently. Right now I have a easy task: Get a
>> file,
>If I were you, I'd try mmap()ing the file instead of reading it
>into string objects one chunk at a time.

You've snipped the bit further on in that sentence where the OP
says that the file of interest is 2GB. Do you still want to try
mmap'ing it?

\S -- siona at --
   "Frankly I have no feelings towards penguins one way or the other"
        -- Arthur C. Clarke
   her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump

More information about the Python-list mailing list