Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #79282 > unrolled thread

Re: Flush stdin

Started byChris Angelico <rosuav@gmail.com>
First post2014-10-19 12:23 +1100
Last post2014-10-19 12:23 +1100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Flush stdin Chris Angelico <rosuav@gmail.com> - 2014-10-19 12:23 +1100

#79282 — Re: Flush stdin

FromChris Angelico <rosuav@gmail.com>
Date2014-10-19 12:23 +1100
SubjectRe: Flush stdin
Message-ID<mailman.14976.1413681789.18130.python-list@python.org>
On Fri, Oct 17, 2014 at 10:38 PM, Empty Account <emptya45@gmail.com> 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

After lengthy discussion about what it means to flush stdin, I think
it's high time someone asked the question: Why not skip nc altogether,
and have your Python program do its own socket work? Then you don't
have to worry about stream flushing at all.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web