HOW TO SEND BATTERY PERCENTAGE NOTIFICATIONS USING PYTHON?
what is battery notification
Windows peppers you with warnings because the battery power gets low. The Battery notification icon on the taskbar changes, and eventually pop-up messages seem. the thought is to alarm you: Either charge the battery, save your work, and pack up — or pray.
First, we install py-notifier in command prompt
pip install py-notifier
pip install psutil
second, we import all library on jupyter notebook
from pynotifier import Notification
import psutil
psutil sends the return information about the battery
battery = psutil.sensor_battery()
percent= battery.percent
For notification in your desktop screen print the battery percentages
Notifications("Battery Percentages in your devices", str(percent)+"% percent remaining", duration = 25).send()
lets run the code
your battery percentage 75%
#computerengineer #machinelearningalgorithms #computertech #computerprogramming #computertechnology #macscreen #rule #datascientist #privatliv #datavisualization #privacyscreens #computerlove #pcscreens #visualhacking #ml #computergraphics #pcgaming #bhfyp #computersetup #artificialintelligenceai #computerart #programmer #developer #software #dataprivacy #imageprocessing #protectyourprivacy #overtheshouldersurfing #coder #computerrepair
Author
No comments:
Post a Comment