Understanding Popen.communicate
.communicate() writes input (there is no input in this case so it just closes subprocess’ stdin to indicate to the subprocess that there is no more input), reads all output, and waits for the subprocess to exit. The exception EOFError is raised in the child process by raw_input() (it expected data but got EOF (no … Read more