Coders Packet

Laptop Battery Notifier using Python.

By Paras Rawat

A python script to get the remaining battery percentage of the laptop using multiple libraries.

Requirements:

1) Install psutil

    "pip install psutil"

2) Install pyobjus

   "pip install pyobjus"

3) Install cython

   "pip install cython"

4) Install plyer

   "pip install plyer"

 

Methodology:

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.

 

Download Complete Code

Comments

No comments yet

Download Packet

Reviews Report

Submitted by Paras Rawat (Paras07)

Download packets of source code on Coders Packet