結果 : how to capture terminal output in python