[Numpy-discussion] Grepping the source

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


Edward C. Jones <edcjones at erols.com>:
[snip]
>     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
http://hetland.org




More information about the Numpy-discussion mailing list