I\'m trying to use Python to automate a process that involves calling a Fortran executable and submitting some user inputs. I\'ve spent a few hours reading through similar
As the spec says communicate() awaits for the subprocess to terminate, so the second call will be addressed to the finished process.
communicate()
If you want to interact with the process, use p.stdin&Co instead (mind the deadlock warning).