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


Groups > comp.lang.python > #80312

Re: Misunderstanding buffering - flushing isn't

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'output': 0.05; 'environments': 0.07; 'newline': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'trailing': 0.09; 'wrote': 0.14; '(just': 0.16; 'comma': 0.16; 'received:80.91.229.3': 0.16; 'received:97': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'appears': 0.22; 'print': 0.22; 'case.': 0.24; 'skip': 0.24; "i've": 0.25; 'header:X-Complaints-To:1': 0.27; 'am,': 0.29; 'respective': 0.29; 'request,': 0.31; 'worked': 0.33; 'guess': 0.33; 'maybe': 0.34; 'but': 0.35; 'nov': 0.38; 'to:addr:python- list': 0.38; 'files': 0.38; 'that,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'stand': 0.64; 'subject:skip:M 10': 0.84
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Dave Angel <davea@davea.name>
Subject Re: Misunderstanding buffering - flushing isn't
Date Wed, 5 Nov 2014 23:11:47 -0500 (EST)
Organization news.gmane.org
References <CANc-5UzkMpojwtTyY0kEAK1YiNnMmSKGgF0+VR=VsRUb_+etSQ@mail.gmail.com> <CANc-5UxvM2mKCcaumCyRRj_WuHa2_6vR=d5tykX9dmEkxsn9_w@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host 97.73.240.68
X-Newsreader PiaoHong.Usenet.Client.VIP:1.63
X-Archive encrypt
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.15533.1415247125.18130.python-list@python.org> (permalink)
Lines 24
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1415247125 news.xs4all.nl 2850 [2001:888:2000:d::a6]:40748
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 3350
X-Received-Body-CRC 3272213462
Xref csiph.com comp.lang.python:80312

Show key headers only | View raw


Skip Montanaro <skip.montanaro@gmail.com> Wrote in message:
> On Wed, Nov 5, 2014 at 10:44 AM, Skip Montanaro
> <skip.montanaro@gmail.com> wrote:
>> I figured everything would be flushed to the respective .stdout and
>> .stderr files at the end of every request, but that appears not to be
>> the case.
> 
> I stand corrected. I added
> 
>         print ">> request finished"
> 
> to the end of do_GET (just before the flush() calls). I see that in
> the output files after the request finishes. Maybe I was just
> dreaming...
> 
> S
> 

Wild guess here. I've worked in environments where a newline would
 trigger a flush.  To check that,  try a trailing comma on the
 last print, which suppresses the newline.
-- 
DaveA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Misunderstanding buffering - flushing isn't Dave Angel <davea@davea.name> - 2014-11-05 23:11 -0500

csiph-web