Measure Temperature

You have options ....

$ sudo apt-get install sensors-applet # size = 435 kB
$ sudo apt-get install psensor && sudo sensors-detect # size = 649 kB
$ sudo apt-get install hardinfo # size = 319 kB
$ sudo apt-get install xsensors lm-sensors && sudo sensors-detect 
$ cat /sys/class/thermal/thermal_zone*/temp # without installing a software

If want to use Python ....

>>> import psutil
>>> psutil.sensors_temperatures()['coretemp']
[shwtemp(label='Physical id 0', current=67.0, high=100.0, critical=100.0), shwtemp(label='Core 0', current=67.0, high=100.0, critical=100.0), shwtemp(label='Core 1', current=65.0, high=100.0, critical=100.0)]

You can install psutil using one of the following commands ... depending on what you're using ...

$ apt-get install psutil
$ apt-get install python-psutil
$ apt-get install pythpn3-psutil

Source