title: Python Linux unable to press enter key in subprocess.Popen
body: <p>I am running a script for IPV6 certification using the following command. </p>
  
  <p>This script runs and we need to press enter key multiple times to continue the script. But I am unable to press enter key. If someone help me on this it will be very helpful</p>
  
  <pre><code>process = subprocess.Popen(['make clean;make "AROPT= -s 2 -e 2" 
  ipv6ready_p2_end_node'], shell=True, stdin=subprocess.PIPE, 
  stdout=subprocess.PIPE)
  
  for c in iter(lamda: process.stdout.readline(), ''):
    line=c.decode('utf-8')
    sys.stdout.write(line)
    if line.find('press Enter key') != -1 :
      process.communicate(b'\n') #Pressing the Enter key - its not working
  </code></pre>