title: Popen Communicate with PIPE does not catch all output of process
body: <p>I'm trying to run a python script and capture the output of it. It seems like after the first output line it redirects to the console instead of to my string. Manage.py is a command-line utility for managing Django projects, like starting the production server or running unit tests.</p>
  
  <p>This is my code:</p>
  
  <pre><code>import os, string, datetime
  from subprocess import Popen, PIPE
  
  def runProcess(command, parameters):
      process =  Popen([command]+parameters, stdout=PIPE)
      output=process.communicate()[0]
      return output
  
  testStatus=runProcess('python',['manage.py','test','coffeebean'])
  
  print ("*****Own output*****")
  print(testStatus)
  </code></pre>
  
  <p>This is the output:</p>
  
  <pre><code>Ran 1 test in 0.000s
  
  OK
  *****Own output*****
  Creating test database for alias 'default'...
  Destroying test database for alias 'default'...
  </code></pre>
  
  <p>Why are the first lines not catched?</p>
  
  <p>Best regards,
  Daniel</p>