reading from sys.stdin

draghuram at gmail.com draghuram at gmail.com
Thu Apr 12 10:45:01 EDT 2007


On Apr 12, 4:20 am, "7stud" <bbxx789_0... at yahoo.com> wrote:
> I can't break out of the for loop in this example:
>
> ------
> import sys
>
> lst = []
> for line in sys.stdin:
>     lst.append(line)
>     break
>
> print lst
> -----------

You may want to look at a related issue:

http://www.python.org/sf/1633941

Thanks,
Raghu.





More information about the Python-list mailing list