Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #79279
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <cameron@cskk.homeip.net> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.029 |
| X-Spam-Evidence | '*H*': 0.94; '*S*': 0.00; 'api': 0.11; 'python': 0.11; "wouldn't": 0.14; '>on': 0.16; 'discarded.': 0.16; 'flush': 0.16; 'from:addr:cs': 0.16; 'from:addr:zip.com.au': 0.16; 'from:name:cameron simpson': 0.16; 'message-id:@cskk.homeip.net': 0.16; 'received:211.29': 0.16; 'received:211.29.132': 0.16; 'received:cskk.homeip.net': 0.16; 'received:homeip.net': 0.16; 'received:optusnet.com.au': 0.16; 'received:syd.optusnet.com.au': 0.16; 'roy': 0.16; 'simpson': 0.16; 'wrote:': 0.18; 'input': 0.22; 'print': 0.22; 'header:User-Agent:1': 0.23; 'cheers,': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; "i'm": 0.30; '+0100,': 0.31; 'fri,': 0.33; "can't": 0.35; 'but': 0.35; 'received:com.au': 0.36; 'received:211': 0.38; 'to:addr:python-list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; 'most': 0.60; 'lost': 0.61; 'content-disposition:inline': 0.62; 'account': 0.65; 'fire': 0.65; 'needs,': 0.65; 'nobody': 0.68; 'memories': 0.84; 'ships': 0.84; 'streams': 0.84; 'shoulder': 0.91; 'watched': 0.91 |
| Date | Sun, 19 Oct 2014 08:01:11 +1100 |
| From | Cameron Simpson <cs@zip.com.au> |
| To | python-list@python.org |
| Subject | Re: Flush stdin |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| In-Reply-To | <pan.2014.10.18.16.55.19.164000@nowhere.invalid> |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| References | <pan.2014.10.18.16.55.19.164000@nowhere.invalid> |
| X-Optus-CM-Score | 0 |
| X-Optus-CM-Analysis | v=2.1 cv=dMCfxopb c=1 sm=1 tr=0 a=YuQlxtEQCowy2cfE5kc7TA==:117 a=YuQlxtEQCowy2cfE5kc7TA==:17 a=ZtCCktOnAAAA:8 a=PO7r1zJSAAAA:8 a=LcaDllckn3IA:10 a=r5UFkecV8NkA:10 a=IkcTkHD0fZMA:10 a=vrnE16BAAAAA:8 a=AdnIQGEx3bcDsBmIEi0A:9 a=QEXdDO2ut3YA:10 |
| 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.14974.1413667595.18130.python-list@python.org> (permalink) |
| Lines | 23 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1413667595 news.xs4all.nl 2906 [2001:888:2000:d::a6]:53161 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:79279 |
Show key headers only | View raw
On 18Oct2014 17:55, Nobody <nobody@nowhere.invalid> 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.
Sure you can. Most streams are read through an API which buffers. That buffer
can be discarded.
I'm not sure it is what the OP needs, but it is not a nonsensical idea.
Cheers,
Cameron Simpson <cs@zip.com.au>
I've seen things you people wouldn't believe. Attack ships on fire off the
shoulder of Orion. I've watched C-beams glitter in the dark near the
Tannhauser Gate. All these memories will be lost in time, like tears in rain.
- Roy Baty, _Blade Runner_
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Flush stdin Empty Account <emptya45@gmail.com> - 2014-10-17 12:38 +0100
Re: Flush stdin Nobody <nobody@nowhere.invalid> - 2014-10-18 17:55 +0100
Re: Flush stdin Tim Chase <python.list@tim.thechases.com> - 2014-10-18 12:32 -0500
Re: Flush stdin Nobody <nobody@nowhere.invalid> - 2014-10-19 02:11 +0100
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-18 18:34 -0700
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-18 18:42 -0700
Re: Flush stdin Nobody <nobody@nowhere.invalid> - 2014-10-22 03:49 +0100
Re: Flush stdin Dan Stromberg <drsalists@gmail.com> - 2014-10-21 20:11 -0700
Re: Flush stdin MRAB <python@mrabarnett.plus.com> - 2014-10-18 18:55 +0100
Re: Flush stdin Cameron Simpson <cs@zip.com.au> - 2014-10-19 08:01 +1100
Re: Flush stdin Terry Reedy <tjreedy@udel.edu> - 2014-10-18 18:35 -0400
csiph-web