Redirect stdout to stderr for python