redirect-io (pypi): Context managers to redirect stderr or stdout.
Keywords: stdout|stderr|context|manager