> In Perl I would do:
>
> while (<>)
> {
> print if line meets selection criteria;
> }You may want to check out the fileinput module. It takes care of multiple files being passed as input and such like too. > for line in sys.stdin: > if line meets selection criteria: > print line > for line in sys.stdin: > IOError: [Errno 9] Bad file descriptor Sorry, I'm stumped - you did import sys I assume? Alan G. _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
