I have a shell script which asks the user for too many questions.
I want to answer every question that ends with :
with a enter, and every question that ends with a ?
with y
enter.
e.g.,
Enter your name: enter Enter your email: enter ... Are you sure these details are correct? yenter
I have started the subprocess with:
subprocess.Popen(shell=True, stdout=sp.PIPE, stderr=sp.STDOUT, stdin=sp.PIPE)
How do I poll over the script's output, waiting for the question to appear?