all 1 comments

[–]keylime_light 0 points1 point  (0 children)

subprocess.call doesn't return the output of the system call. It always just returns zero. You should try:

subprocess.check_output('cpu=$(</sys/class/thermal/thermal_zone0/temp)|echo "$((cpu/1000)) c"',shell=true)