Flush stdin

MRAB python at mrabarnett.plus.com
Sat Oct 18 19:55:04 CEST 2014


On 2014-10-18 17:55, Nobody wrote:
> On Fri, 17 Oct 2014 12:38:54 +0100, Empty Account wrote:
>
>> I am using netcat to listen to a port and python to read stdin and print
>> to the console.
>>
>> nc -l 2003 | python print_metrics.py
>>
>> sys.stdin.flush() doesn’t seem to flush stdin,
>
> You can't "flush" an input stream.
>
[snip]

Flushing an input stream means (or could mean) discarding any data
that's currently in the buffer.




More information about the Python-list mailing list