[issue24500] provide context manager to redirect C output

2016-06-02 Thread Zahari Dim

Zahari Dim added the comment:

Considering Python is used often to interact with lower level
languages, it seems interesting to have the ability to control the
"real" standard output and error that those languages use. Note that
redirecting to /dev/null is only one possible application of this
feature. Others would be for example linking the stout to the logging
module.

Specifically regarding redirecting to /dev/null, in my experience this
would be fairly useful In scientific software where low level code
tends to be used on scientific merits rather than on how much control
it has over verbosity.

On Sun, May 8, 2016 at 12:04 AM, Martin Panter  wrote:
>
> Martin Panter added the comment:
>
> Is it really common to have a C wrapper with undesirable output? I suspect 
> there is not much demand for this feature. Maybe this would be better outside 
> of Python’s standard library.
>
> --
> nosy: +martin.panter
> status: open -> languishing
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24500] provide context manager to redirect C output

2016-05-07 Thread Martin Panter

Martin Panter added the comment:

Is it really common to have a C wrapper with undesirable output? I suspect 
there is not much demand for this feature. Maybe this would be better outside 
of Python’s standard library.

--
nosy: +martin.panter
status: open -> languishing

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24500] provide context manager to redirect C output

2015-06-26 Thread Zahari Dim

Zahari Dim added the comment:

Well, the simple minded example I posted has so many bugs (many of which I 
don't understand, for example why it destroys the stdout of an interpreter 
permanently) that I really think this feature is necessary.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24500
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24500] provide context manager to redirect C output

2015-06-24 Thread R. David Murray

R. David Murray added the comment:

This was discussed in the original redirect_stdout issue (issue 15805).  It was 
suggested then that C level redirection was a separate issue, and should 
probably be something in the subprocess module.

--
components:  -Extension Modules
nosy: +r.david.murray
stage:  - needs patch
title: contextlib.redirect_stdout should redirect C output - provide context 
manager to redirect C output
versions: +Python 3.6 -Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue24500
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com