Just in case you don't know about it: there is a [file.readlines][1] method that does the same.

[1]: http://docs.python.org/2.7/library/stdtypes.html#file.readlines