On Mon, Nov 2, 2015 at 1:22 PM, Steven D'Aprano
wrote:
>
> So how come Python 3 has line buffered stderr? And more importantly, how can
> I turn buffering off?
>
> I don't want to use the -u unbuffered command line switch, because that
> effects stdout as
On 11/3/2015 10:18 PM, Steven D'Aprano wrote:
On Wednesday 04 November 2015 09:25, Terry Reedy wrote:
On 11/3/2015 10:42 AM, Chris Angelico wrote:
On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
Nobody writes:
It's probably related to the
On 04.11.2015 11:43, Wolfgang Maier wrote:
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),
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
Random832 wrote:
>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
On 04.11.2015 04:18, Steven D'Aprano wrote:
On Wednesday 04 November 2015 09:25, Terry Reedy wrote:
On 11/3/2015 10:42 AM, Chris Angelico wrote:
On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
Nobody writes:
It's probably related to the
On Wed, 4 Nov 2015 07:19 pm, Wolfgang Maier wrote:
> On 04.11.2015 04:18, Steven D'Aprano wrote:
>> On Wednesday 04 November 2015 09:25, Terry Reedy wrote:
>>
>>> On 11/3/2015 10:42 AM, Chris Angelico wrote:
On Wed, Nov 4, 2015 at 2:00 AM, Random832
wrote:
>
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
Nobody 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.
On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
> Nobody 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
Forwarded Message
Subject:Re: Unbuffered stderr in Python 3
Date: Tue, 03 Nov 2015 18:03:51 +
From: George Trojan <george.tro...@noaa.gov>
To: python-list@python.org
On 11/03/2015 05:00 PM, python-list-requ...@python.org wrote:
On Mon, 02 Nov 2
On 11/03/2015 05:00 PM, python-list-requ...@python.org wrote:
On Mon, 02 Nov 2015 18:52:55 +1100, Steven D'Aprano wrote:
In Python 2, stderr is unbuffered.
In most other environments (the shell, C...) stderr is unbuffered.
It is usually considered a bad, bad thing for stderr to be buffered.
On 11/3/2015 10:42 AM, Chris Angelico wrote:
On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
Nobody 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
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,
On Wednesday 04 November 2015 09:25, Terry Reedy wrote:
> On 11/3/2015 10:42 AM, Chris Angelico wrote:
>> On Wed, Nov 4, 2015 at 2:00 AM, Random832 wrote:
>>> Nobody writes:
>>>
It's probably related to the fact that std{in,out,err} are
On Mon, 02 Nov 2015 18:52:55 +1100, Steven D'Aprano wrote:
> In Python 2, stderr is unbuffered.
>
> In most other environments (the shell, C...) stderr is unbuffered.
>
> It is usually considered a bad, bad thing for stderr to be buffered. What
> happens if your application is killed before the
In Python 2, stderr is unbuffered.
In most other environments (the shell, C...) stderr is unbuffered.
It is usually considered a bad, bad thing for stderr to be buffered. What
happens if your application is killed before the buffer fills up? The errors
in the buffer will be lost.
So how come
On 02.11.2015 11:48, Wolfgang Maier wrote:
Since Python3.3, the print function has a flush keyword argument that
accepts a boolean and lets you do just this. Rewrite your example as:
import sys, time
def test():
# Simulate a slow calculation that prints status and/or error
# messages to
On 02.11.2015 08:52, Steven D'Aprano wrote:
In Python 2, stderr is unbuffered.
In most other environments (the shell, C...) stderr is unbuffered.
It is usually considered a bad, bad thing for stderr to be buffered. What
happens if your application is killed before the buffer fills up? The
19 matches
Mail list logo