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 vstinner
Recipients barry, ncoghlan, rhettinger, vstinner
Date 2014-09-12.07:41:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1410507671.37.0.0118019312259.issue22389@psf.upfronthosting.co.za>
In-reply-to
Content
redirect_stdout("stderr", stream) looks wrong to be: you want to redirect "stdout" or "stderr"?

If you want to redirect something else (ex: stdin), you can still implement the very simple pattern:

old_stdin = sys.stdin
try:
  sys.stdin = mock_input
  ...
finally:
  sys.stdin = old_stdin

By the way, I'm not convinced that we should add redirect_stderr.

@Barry: How many usage of this new functions do you see in the standard library?
History
Date User Action Args
2014-09-12 07:41:11vstinnersetrecipients: + vstinner, barry, rhettinger, ncoghlan
2014-09-12 07:41:11vstinnersetmessageid: <1410507671.37.0.0118019312259.issue22389@psf.upfronthosting.co.za>
2014-09-12 07:41:11vstinnerlinkissue22389 messages
2014-09-12 07:41:10vstinnercreate