Get output and Return code from external shell command in python
<p>Suppose I run a command <code>cmd="start python Testscript.py"</code> using subprocess in python.  </p>

<pre><code>subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
</code></pre>

<blockquote>
  <ol>
  <li>Is there any way to get the output of the new command console ?</li>
  <li>Is there any way to get the return code from the TestScript.py into the calling python function.</li>
  </ol>
</blockquote>