Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98166
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Unbuffered stderr in Python 3 |
| Date | Wed, 4 Nov 2015 02:42:19 +1100 |
| Lines | 19 |
| Message-ID | <mailman.30.1446565341.8789.python-list@python.org> (permalink) |
| References | <5637165b$0$1505$c3e8da3$5496439d@news.astraweb.com> <pan.2015.11.03.07.10.58.482000@nowhere.invalid> <874mh39lgu.fsf@fastmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de n5w+5SDtXa++isspxczqTw97l+2HO6VRhVb/7n4Y8TTw== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.008 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'received:209.85.223': 0.03; 'subject:Python': 0.05; 'cc:addr:python-list': 0.09; 'byte,': 0.09; 'streams.': 0.09; 'sys.stderr': 0.09; 'output': 0.13; 'wed,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'bytes': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'oversight': 0.29; 'character': 0.29; 'probably': 0.31; 'related': 0.32; 'stream': 0.33; 'received:google.com': 0.35; 'nov': 0.35; 'unicode': 0.35; 'but': 0.36; 'should': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'making': 0.62; 'course': 0.62; 'fundamental': 0.66; 'chrisa': 0.84; 'significance': 0.84; 'streams': 0.84; 'to:none': 0.91; 'different.': 0.91 |
| 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:cc :content-type; bh=TFbnCvPCwO+m2OUQNt9oMp3P65vEQs8so8m1dMDV9XQ=; b=Ci+vIDNiyG5+RBixT6xAf3z/5rZWptHRE4q/6ZNT0oVzQMOMgmv5obyNTIRIkOf40w 0mMgJYSTEe9WX0Qd3+s4UTW3XLPpBD8ZFTGUm6pkgxg4jUbq5EHUWci9T40MxQtPyhzU 5kUjLu8PwDhBSczCZGF47TxcwscPm1QIftaMmn+LVHat4dir0ney4wGEnKhaEWZXL+OV yXgVqAoco0DHqFVls5qvSvWBovpTF1YCvRfia8hG3TYgk25IT+0KN9wzRqQBGTqIjpc7 mD3q1/ipO+svsisrLrGE1nNQV5VdRDfPePQ5qwrhqnY6tFCcND/puuPoBNeZKcrKEIsz GZiQ== |
| X-Received | by 10.107.34.149 with SMTP id i143mr26565818ioi.157.1446565339271; Tue, 03 Nov 2015 07:42:19 -0800 (PST) |
| In-Reply-To | <874mh39lgu.fsf@fastmail.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| 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> |
| Xref | csiph.com comp.lang.python:98166 |
Show key headers only | View raw
On Wed, Nov 4, 2015 at 2:00 AM, Random832 <random832@fastmail.com> wrote:
> Nobody <nobody@nowhere.invalid> writes:
>
>> It's probably related to the fact that std{in,out,err} are Unicode
>> streams.
>
> There's no fundamental reason a Unicode stream should have to be line
> buffered. If it's "related", it's only in that an oversight was made in
> the course of making that change.
Yep. Unicode *input* streams need to be buffered, but *output* can
always be insta-flushed. The only significance of Unicode to output is
that a single character may cause multiple bytes to be output; and
since output can block for even a single byte, it should be no
different.
+1 for making sys.stderr unbuffered.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Unbuffered stderr in Python 3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-02 18:52 +1100
Re: Unbuffered stderr in Python 3 Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-11-02 11:48 +0100
Re: Unbuffered stderr in Python 3 Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-11-02 11:54 +0100
Re: Unbuffered stderr in Python 3 Nobody <nobody@nowhere.invalid> - 2015-11-03 07:10 +0000
Re: Unbuffered stderr in Python 3 Random832 <random832@fastmail.com> - 2015-11-03 10:00 -0500
Re: Unbuffered stderr in Python 3 Chris Angelico <rosuav@gmail.com> - 2015-11-04 02:42 +1100
Re: Unbuffered stderr in Python 3 Terry Reedy <tjreedy@udel.edu> - 2015-11-03 17:25 -0500
Re: Unbuffered stderr in Python 3 Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-11-04 14:18 +1100
Re: Unbuffered stderr in Python 3 Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-11-04 09:19 +0100
Re: Unbuffered stderr in Python 3 Steven D'Aprano <steve@pearwood.info> - 2015-11-04 21:24 +1100
Re: Unbuffered stderr in Python 3 Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-11-04 11:43 +0100
Re: Unbuffered stderr in Python 3 Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2015-11-04 12:49 +0100
Re: Unbuffered stderr in Python 3 Random832 <random832@fastmail.com> - 2015-11-04 08:43 -0500
Re: Unbuffered stderr in Python 3 Terry Reedy <tjreedy@udel.edu> - 2015-11-04 18:00 -0500
Re: Unbuffered stderr in Python 3 srinivas devaki <mr.eightnoteight@gmail.com> - 2015-11-06 19:10 +0530
csiph-web