Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98219
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: Unbuffered stderr in Python 3 |
| Date | Wed, 4 Nov 2015 11:43:18 +0100 |
| Lines | 30 |
| Message-ID | <mailman.10.1446633813.16136.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> <CAPTjJmqDMkq3Q9ztaSLFUbJ=CK2dL=Od+JL=kxXavytEXVWYVQ@mail.gmail.com> <mailman.1.1446589565.20590.python-list@python.org> <56397921$0$11094$c3e8da3@news.astraweb.com> <mailman.5.1446625197.16136.python-list@python.org> <5639dcdf$0$1620$c3e8da3$5496439d@news.astraweb.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de tBM5nh1ijfnwfjyORdjtrAre8C9dOyOJK8obuujgdi1w== |
| 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.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'terminated': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'stderr': 0.09; 'sys.stderr': 0.09; 'thread': 0.10; 'python': 0.10; ':-)': 0.12; 'output': 0.13; 'wed,': 0.15; 'file,': 0.15; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; '>>>': 0.20; '2015': 0.20; 'meant': 0.22; 'written': 0.24; 'header:In-Reply-To:1': 0.24; 'header:User- Agent:1': 0.26; "doesn't": 0.26; 'header:X-Complaints-To:1': 0.26; 'skip:" 20': 0.26; 'prints': 0.29; 'received:132': 0.29; 'code': 0.30; 'another': 0.32; "d'aprano": 0.33; 'steven': 0.33; 'nov': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'does': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'your': 0.60; 'show': 0.62; 'our': 0.64; 'was:': 0.66; 'console,': 0.84; 'first?': 0.84; 'redirecting': 0.84; 'seriously,': 0.91; 'going?': 0.93 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| X-Gmane-NNTP-Posting-Host | 132.230.194.237 |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
| In-Reply-To | <5639dcdf$0$1620$c3e8da3$5496439d@news.astraweb.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:98219 |
Show key headers only | View raw
On 04.11.2015 11:24, Steven D'Aprano wrote:
> On Wed, 4 Nov 2015 07:19 pm, Wolfgang Maier wrote:
>
>> On 04.11.2015 04:18, Steven D'Aprano wrote:
>>>
>>> This is one of the offending line from our code base:
>>>
>>> print('<4>Suspicious answer "{}"!'.format(answer), file=sys.stderr)
>>>
>>> So that ought to be terminated by a newline. And yet, the stderr output
>>> doesn't show up until the program exits.
>>>
>>
>> For me, that prints immediately. Where is your output going? Console,
>> file, ...?
>
> Going to stderr, like the whole thread is about :-)
>
I see :), but seriously, what I meant was: is it going to the console
directly or is your code base redirecting sys.stderr to another buffered
object first?
>
> The output does eventually show up written to the console, but only after
> Python exits.
>
>
>
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