title: python subprocess for user input
body: <p>I want to get user input from a subprocess in an new terminal.</p>
  <pre><code>    import subprocess
      additionalBuildArguments = &quot;defaultarg1&quot;
      proc = subprocess.Popen([&quot;python&quot;, &quot;user_input.py&quot;, additionalBuildArguments],
                              creationflags=subprocess.CREATE_NEW_CONSOLE,
                              stdout=subprocess.PIPE, stderr=subprocess.PIPE)
      try:
          outs, errs = proc.communicate(timeout=15)
      except subprocess.TimeoutExpired:
          proc.kill()
          outs, errs = proc.communicate()
      additionalBuildArguments = outs or additionalBuildArguments
  </code></pre>
  <p>user_input.py:</p>
  <pre><code>import sys
  
  arg = sys.argv[1]
  user_input = input(f&quot;Additional build arguments [{arg}] (Push &lt;ENTER&gt; to use these settings):\n&quot;)
  print(user_input)
  </code></pre>
  <p>as long as I don't set the <strong>stdout=subprocess.PIPE</strong> and/or the <strong>stderr=subprocess.PIPE</strong> options I can enter input. But with these options I can't write any input to the console.
  Indeed I need these options to redirect the stdout, to have access to the printed <strong>user_input</strong> in the parent process.
  Does anyone know what's the problem here?</p>