title: Write and read from subprocess in Python
body: <p>I need to send informations to a bot launched by a client. I've tried to do something like</p>
  <pre><code>bot_process = subprocess.Popen(argv, \
                     stdin=subprocess.PIPE, \
                     stdout=subprocess.PIPE)
  
  while True:
      bot_stdout = bot_process.communicate(message.encode())[0]
      print(bot_stdout)
  </code></pre>
  <p>But function communicate() stop the process after one call.</p>
  <p>I need to send continually informations to my bot and listen his response. Do you have any solutions to <code>run bot before loop and write in bot stdin + listen to bot stdout inside the loop</code> ?</p>
  <p>Thanks !</p>