tempFile = open('/tmp/myAppName.file.txt', 'w')
p2 = Popen(cmd, stdin=p1.stdout, stdout=PIPE, stderr=tempFile)
In Python, how can I chain multiple processes together with popen, while redirecting intermediate partial results into a string