Reading from sys.stdin reads the whole file in

Steven D'Aprano steve at pearwood.info
Wed Aug 27 03:33:34 EDT 2014


On Tue, 26 Aug 2014 23:07:36 -0700, Naoki INADA wrote:

> for line in iter(sys.stdin.readline(), ''):

Thanks for that. Removing the parens after readline seems to do the trick.



-- 
Steven



More information about the Python-list mailing list