Nick Coghlan added the comment:

I'd actually be inclined to make it the full trio: redirect_stdin, 
redirect_stdout, redirect_stderr.

Mostly because I don't see an especially compelling reason to privilege 
redirecting stdout over the other two standard streams, and the "pass in the 
stream name" approach is just ugly (e.g. we don't have 
"sys.stdstream['stdin']", we have sys.stdin).

There are plenty of command line apps that have both -i and -o options (to 
select input and output files), and "2>1" is a pretty common shell redirection.

Agreed that the general purpose nature of standard stream redirection makes it 
a good fit for contextlib, though.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15805>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to