結果 : python redirect stdout to function