結果 : write output of command to file python