Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79348
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <drsalists@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.013 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'suppose': 0.07; 'sys': 0.07; 'cc:addr:python-list': 0.11; '(there': 0.16; 'cc:name:python list': 0.16; 'localhost': 0.16; 'popping': 0.16; 'tcp': 0.16; 'test).': 0.16; 'tty': 0.16; '(the': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'versions': 0.24; 'cc:2**0': 0.24; 'second': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; 'file': 0.32; "we're": 0.32; 'run': 0.32; 'another': 0.32; 'skip:# 10': 0.33; 'received:google.com': 0.35; 'done': 0.36; 'two': 0.37; 'that,': 0.38; 'even': 0.60; 'read': 0.60; 'different': 0.65; 'acts': 0.74; '9000': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=iOXxEyTMoQtJ4/yofJcmWanPhMpFAQssNjhilNJPlyg=; b=u+A0Sakk6jPHVZkFIpqKCdnv2NRgzxNUfAS6Zee1YANvDgoV1HgTJzGCN5HDNjXMxx iD/s4+y39TD3i2/6G/MhuIiIzwj/63LdOwq0a5u9wzdQQFgma1T42W4Kp5CeJq+FZebY J/LnuQaChFHJm29R9PoaKn/W2/vuhxu6Nwj/Z+NxqfXLgDg6j7ewyYOZzcmGgAS7Wngs D5Ydpxmxf6xXZJGjDrDQC0g5tIIZ0b7TA4XkN6/5XhQ8qN1T3cAVUG0zkUnlr13eaJZ6 /aoAa+xP3aiNo99yRjSD14AznqKag8v1d0udfN2REtyr8JryYJmlReaofD5iyncEBWwq B9Qw== |
| MIME-Version | 1.0 |
| X-Received | by 10.112.198.73 with SMTP id ja9mr30074175lbc.19.1413845571297; Mon, 20 Oct 2014 15:52:51 -0700 (PDT) |
| In-Reply-To | <CAGGBd_qsZ=-8sn0YQPT1XQf9Qcn9cJ4Aw=hgR6=at0KzjN3xsg@mail.gmail.com> |
| References | <CAGGBd_r7tdPc1ZTA380-9aNRnbr6Dm3HzhG2cCH2sJwWn=c5iQ@mail.gmail.com> <mailman.14990.1413777392.18130.python-list@python.org> <87a94rgxi5.fsf@elektro.pacujo.net> <CAGGBd_qsZ=-8sn0YQPT1XQf9Qcn9cJ4Aw=hgR6=at0KzjN3xsg@mail.gmail.com> |
| Date | Mon, 20 Oct 2014 15:52:51 -0700 |
| Subject | Re: Flush stdin |
| From | Dan Stromberg <drsalists@gmail.com> |
| To | Marko Rauhamaa <marko@pacujo.net> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | Python List <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15012.1413845578.18130.python-list@python.org> (permalink) |
| Lines | 25 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1413845578 news.xs4all.nl 2936 [2001:888:2000:d::a6]:37918 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:79348 |
Show key headers only | View raw
If I run the following in one tty:
nc -l localhost 9000 | /tmp/z
...where /tmp/z has just:
#!/usr/bin/python3
import sys
for line in sys.stdin.buffer:
print(line)
And then run the following in another tty on the same computer:
while read line; do echo $line; sleep 1; done < /etc/passwd | nc
localhost 9000
...then everything acts line buffered, or perhaps even character
buffered (the two are pretty indistinguishable in this test). What I
see is my /etc/passwd file popping out of the nc -l side, one line at
a time, each line one second apart.
I suppose this suggests that it's the client that's sending TCP data
that is buffering.
That, or we're using two different versions of netcat (there are at
least two available).
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Flush stdin Cameron Simpson <cs@zip.com.au> - 2014-10-20 14:56 +1100
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-20 07:45 +0300
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-20 14:59 -0700
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-21 01:54 +0300
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-20 15:52 -0700
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-21 02:18 +0300
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-20 17:30 -0700
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-21 07:41 +0300
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-21 16:16 -0700
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-22 08:38 +0300
Re: Flush stdin Chris Angelico <rosuav@gmail.com> - 2014-10-22 17:23 +1100
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-22 13:57 +0300
Re: Flush stdin random832@fastmail.us - 2014-10-22 11:01 -0400
Re: Flush stdin Marko Rauhamaa <marko@pacujo.net> - 2014-10-22 18:28 +0300
csiph-web