#NEWLINE# def exec_cmd_redir( cmd , file_fullname ) : #NEWLINE# #INDENT# 'execute a shell command\n    redirect the output to the file' #NEWLINE# with open ( file_fullname , 'w' ) as fout : #NEWLINE# #INDENT# subprocess . call ( file_fullname , stdout = fout )