I have some Python code that executes an external app which works fine when the app has a small amount of output, but hangs when there is a lot. My code looks like:
You could try communicate and see if that solves your problem. If not, I'd redirect the output to a temporary file.