python redirect stdout to variable