[issue24500] provide context manager to redirect C output

Zahari Dim report at bugs.python.org
Thu Jun 2 12:01:09 EDT 2016


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 <report at bugs.python.org> 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 <report at bugs.python.org>
> <http://bugs.python.org/issue24500>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24500>
_______________________________________


More information about the Python-bugs-list mailing list