Message226811
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? |
|
Date |
User |
Action |
Args |
2014-09-12 07:41:11 | vstinner | set | recipients:
+ vstinner, barry, rhettinger, ncoghlan |
2014-09-12 07:41:11 | vstinner | set | messageid: <1410507671.37.0.0118019312259.issue22389@psf.upfronthosting.co.za> |
2014-09-12 07:41:11 | vstinner | link | issue22389 messages |
2014-09-12 07:41:10 | vstinner | create | |
|