Le Mon, 01 Feb 2010 01:33:09 -0800, Stephen.Wu a écrit :
> 
> actually, I just use file.read(length) way, i just want to know what
> exactly para of length I should set, I'm afraid length doesn't equal to
> the amount of physical memory after trials...

There's no exact length you "should" set, just set something big enough 
that looping doesn't add any noticeable overhead, but small enough that 
it doesn't take too much memory. Something between 64kB and 1MB sounds 
reasonable.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to