Regarding file.readlines(). It doesn't create a huge list in memory does it?

13:06 < sjj> yeah, it does.

13:06 < sjj> just use, 'for line in file: ...'

use fileinput with bufsize=32768 http://www.python.org/doc/current/lib/module-fileinput.html and linecache http://www.python.org/doc/current/lib/module-linecache.html

Feedback

Powered by Vanilla PHP feedback form