Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!tfh-berlin.DE!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Unbuffered stderr in Python 3 Date: Tue, 03 Nov 2015 14:45:11 -0500 Lines: 10 Message-ID: References: <5638F707.90309@noaa.gov> Mime-Version: 1.0 Content-Type: text/plain X-Trace: news.uni-berlin.de sPYVs0R11l0QDckXCqyqigJdtioueLGzmOh7SQcU1Afw== Cancel-Lock: sha1:+/ZYvopv1iMnBYGSeKKH8imeQbQ= Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'buffer,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'buffering': 0.16; 'buffering,': 0.16; 'flushed': 0.16; 'opposite': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'runs': 0.18; 'posted': 0.21; 'space.': 0.22; 'header:User- Agent:1': 0.26; "doesn't": 0.26; '(which': 0.26; 'header:X -Complaints-To:1': 0.26; 'possibility': 0.27; 'raw': 0.27; 'disabling': 0.29; 'code': 0.30; 'received:comcast.net': 0.33; "isn't": 0.35; 'but': 0.36; '(i.e.': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'mean': 0.38; 'does': 0.39; 'to:addr:python.org': 0.40; 'guaranteed': 0.67; 'contemplate': 0.84; 'trojan': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: c-68-39-146-59.hsd1.in.comcast.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98186 George Trojan writes: > This does set line buffering, but does not change the behaviour: The opposite of line buffering is not no buffering, but full (i.e. block) buffering, that doesn't get flushed until it runs out of space. TextIOWrapper has its own internal buffer, and its design apparently doesn't contemplate the possibility of using it with a raw FileIO object (which may mean that the posted code isn't guaranteed to work) or disabling buffering.