That is good. But if you want to change it to use call_subprocess_Popen to remove the stdout, stderr and communicat handling, it would made this code shorter and use the higher level interface.