I want to be able to define a variable by the return value of a script. This is what I currently have:

```
sum_total_earnings_usd = subprocess.call([SCRIPT, "-d", date])

```

I have checked the return value of SCRIPT, however, when I try and set this variable, it always returns 0 ( <http://docs.python.org/library/subprocess.html#subprocess.call> ). How would I run this script and capture the return value to store as a variable?