Get a return value using subprocess

前端 未结 3 1315
醉梦人生
醉梦人生 2020-12-03 13:25

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         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-03 14:19

    Use subprocess.check_output() instead of subprocess.call().

提交回复
热议问题