By Paras Rawat
A python script to get the remaining battery percentage of the laptop using multiple libraries.
1) Install psutil
"pip install psutil"
2) Install pyobjus
"pip install pyobjus"
3) Install cython
"pip install cython"
4) Install plyer
"pip install plyer"
1) Import psutil, time, and notification from plyer.
2) Create an object of sensors_battery class of the psutil module. Sensory_battery class helps to get the remaining battery percent.
3) Get the remaining battery percent
4) Create a new notification that will tell the remaining battery percentage.
5) Set the time for the notification to repeat.
Submitted by Paras Rawat (Paras07)
Download packets of source code on Coders Packet