How to capture output of subprocess.call
问题 I have made a script that tells me the temperature of my Raspberry Pi 3, but there is a problem with the script. The result output is the bot saying "Your RPI3 temp is currently 0". What is wrong with my code? @bot.command(pass_context=True) async def vcgencmdmeasure_temp(ctx): if ctx.message.author.id == "412372079242117123": await bot.say("OK....") return_code = subprocess.call("vcgencmd measure_temp", shell=True) await bot.say("KK done") await bot.say("Your RPI3 temp is currently: {}"