Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Detecting power plug
#1
How to find programatically if power cable is plugged in or not?

I have written a python program to check if there is power supply available or not. This program should be active only when power cable is plugged in. Hence I wanted to know answer of the question.

Note: I am using windows 8.x
Reply
#2
It's not April 1st, so what have you been smoking?
Reply
#3
I would start with power. It's supposed to be able to report power state, and should work on Windows. Unfortunately, it doesn't appear to be working on Macs at the moment.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Coding in Power BI Visual vjrans 0 272 Jan-31-2024, 07:54 AM
Last Post: vjrans
  Power Shells vs Compile and Run programs? RockBlok 2 361 Jan-13-2024, 09:08 PM
Last Post: RockBlok
Question Python and Power BI Desktop dangermaus33 1 1,298 Jan-19-2023, 06:54 AM
Last Post: GetOnData
  iterating and detecting the last Skaperen 3 1,068 Oct-01-2022, 05:23 AM
Last Post: Gribouillis
  Detecting float or int in a string Clunk_Head 15 4,505 May-26-2022, 11:39 PM
Last Post: Pedroski55
  module detecting if imported vs not Skaperen 1 1,670 Nov-19-2021, 07:43 AM
Last Post: Yoriz
  detecting a generstor passed to a funtion Skaperen 9 3,588 Sep-23-2021, 01:29 AM
Last Post: Skaperen
  Python BLE Scanner not detecting device alexanderDennisEnviro500 0 2,003 Aug-01-2021, 02:29 AM
Last Post: alexanderDennisEnviro500
  Raising numbers to power ** GJG 3 2,427 Mar-23-2021, 03:43 PM
Last Post: deanhystad
  Detecting USB Device Insertion on Windows 10 Atalanttore 0 2,378 Jan-17-2020, 02:46 PM
Last Post: Atalanttore

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020