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
If your script is returning the value, then you would want to use subprocess.check_output():
subprocess.check_output([SCRIPT, "-d", date], shell=True).
subprocess.check_call() gets the final return value from the script, and 0 generally means "the script completed successfully".
subprocess.check_call()