[Numpy-discussion] Grepping the source

Magnus Lie Hetland magnus at hetland.org
Fri Jan 3 16:24:04 EST 2003

Edward C. Jones <edcjones at erols.com>:
>     lines = f.read().splitlines()

You could use f.readlines() here... Or you could just use

  for line in open(...):

later, if you're using Python 2.2+

Magnus Lie Hetland

More information about the NumPy-Discussion mailing list