Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: Unbuffered stderr in Python 3 Date: Wed, 04 Nov 2015 08:43:56 -0500 Lines: 15 Message-ID: References: <5637165b$0$1505$c3e8da3$5496439d@news.astraweb.com> <874mh39lgu.fsf@fastmail.com> <56397921$0$11094$c3e8da3@news.astraweb.com> <5639dcdf$0$1620$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain X-Trace: news.uni-berlin.de fDvZtZbyk5jcGwoGAPCGXwO9z6zE2JjXu4Ekiump7HTQ== Cancel-Lock: sha1:ob8riIXKYjjUYe8G+NcqmHifYNM= Return-Path: 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; 'subject:Python': 0.05; 'assumed': 0.09; 'buffer,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'stderr': 0.09; 'appropriate': 0.14; 'argument': 0.15; 'earlier.': 0.16; 'justified': 0.16; 'python),': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'shell': 0.18; 'implicit': 0.22; 'header:User- Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'connected': 0.27; 'otherwise.': 0.27; 'i/o': 0.29; '(i.e.,': 0.30; 'received:comcast.net': 0.33; 'windows.': 0.33; '(for': 0.34; 'but': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'does': 0.39; 'to:addr:python.org': 0.40; 'claim': 0.61; 'making': 0.62; 'streams': 0.84 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:98227 Wolfgang Maier writes: > Standard I/O streams are line-buffered only if interactive (i.e., > connected to a console), but block-buffered otherwise. That's not appropriate for stderr, nor is it justified by the argument that Terry Reedy cited earlier. I had assumed he was making an implicit claim that stderr is _always_ line-buffered, _even if_ it is not interactive. > What does sys.stderr.isatty() return? There are many situations in which a nominally interactive process might not have a "tty" for stderr on MS Windows. In an Emacs M-x shell buffer, in a cygwin terminal (for a non-cygwin python), etc.