This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients alex, belopolsky, brett.cannon, ncoghlan, rhettinger
Date 2012-09-26.06:19:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348640358.57.0.303664678326.issue15805@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-09-26 06:19:18ncoghlansetrecipients: + ncoghlan, brett.cannon, rhettinger, belopolsky, alex
2012-09-26 06:19:18ncoghlansetmessageid: <1348640358.57.0.303664678326.issue15805@psf.upfronthosting.co.za>
2012-09-26 06:19:18ncoghlanlinkissue15805 messages
2012-09-26 06:19:17ncoghlancreate