title: Get a return value using subprocess
body: <p>I want to be able to define a variable by the return value of a script. This is what I currently have:</p>
  
  <pre><code>sum_total_earnings_usd = subprocess.call([SCRIPT, "-d", date])
  </code></pre>
  
  <p>I have checked the return value of SCRIPT, however, when I try and set this variable, it always returns 0 ( <a href="http://docs.python.org/library/subprocess.html#subprocess.call" rel="noreferrer">http://docs.python.org/library/subprocess.html#subprocess.call</a> ). How would I run this script and capture the return value to store as a variable?</p>