What's the difference between subprocess Popen and call (how can I use them)?
There are two ways to do the redirect. Both apply to either subprocess.Popen or subprocess.call. Set the keyword argument shell = True or executable = /path/to/the/shell and specify the command just as you have it there. Since you're just redirecting the output to a file, set the keyword argument stdout = an_open_writeable_file_object where the object points to the output file.