Process "Killed"

Fredrik Lundh fredrik at pythonware.com
Fri Aug 29 15:37:30 EDT 2008


Glenn Hutchings wrote:

> Have you checked memory usage while your program is running?  Your
> 
>     lines = f.readlines()[2:]
> 
> statement will need almost twice the memory of your largest file.

footnote: list objects contain references to string objects, not the 
strings themselves.  the above temporarily creates two list objects, but 
the actual file content is only stored once.

</F>




More information about the Python-list mailing list