Hey, this is a quick tip that might save you some time if you need to have all the output of a script going out to a file and you don’t have control over the execution of it. Here I go through two possible ways to tackle the problem: using exec to redirect the stdout and stderr to a specific file; using a subprocess and controlling its stdout and stderr. Both achieve the same, but are slightly different. When do you need this? Using exec to redirect stdout and stderr Redirecting subprocess ...