[issue15805] Add stdout redirection tool to contextlib
Marc Abramowitz
report at bugs.python.org
Mon Jul 22 05:30:33 CEST 2013
Marc Abramowitz added the comment:
I like Nick's version. I don't know if __exit__ really needs error checking, but I like the API. For me, it strikes a good balance between being intuitive and being general enough to do all the stuff I'd like to do.
Should the docstrings mention that it only works within the process and doesn't affect subprocesses?
I also am having second thoughts about putting it in the io module. Now I'm thinking that sys makes more sense because that's where stdin, stdout, and stderr live.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15805>
_______________________________________
More information about the Python-bugs-list
mailing list