I am trying to issue an external shell command via python script. The external command prompts user to type 'Y' and hit enter to proceed further. How do I write the command in python script in a loop so that it does not prompts the user in every loop. I can grab a coffee and step out instead of sitting in front of the PC and hit Y every time I see the prompt.
My python script loops like
<for loop:>
os.system(<External Command>)
I tried echoing "Y\n" but did not work.