[python] Store output of subprocess.Popen call in a string