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
  cheap and low power python device kucingkembar 6 1,667 Jun-27-2024, 12:41 PM
Last Post: kucingkembar
  Python Coding in Power BI Visual vjrans 0 844 Jan-31-2024, 07:54 AM
Last Post: vjrans
  Power Shells vs Compile and Run programs? RockBlok 2 1,237 Jan-13-2024, 09:08 PM
Last Post: RockBlok
Question Python and Power BI Desktop dangermaus33 1 1,992 Jan-19-2023, 06:54 AM
Last Post: GetOnData
  iterating and detecting the last Skaperen 3 1,980 Oct-01-2022, 05:23 AM
Last Post: Gribouillis
  Detecting float or int in a string Clunk_Head 15 10,434 May-26-2022, 11:39 PM
Last Post: Pedroski55
  module detecting if imported vs not Skaperen 1 2,244 Nov-19-2021, 07:43 AM
Last Post: Yoriz
  detecting a generstor passed to a funtion Skaperen 9 5,390 Sep-23-2021, 01:29 AM
Last Post: Skaperen
  Python BLE Scanner not detecting device alexanderDennisEnviro500 0 2,618 Aug-01-2021, 02:29 AM
Last Post: alexanderDennisEnviro500
  Raising numbers to power ** GJG 3 3,594 Mar-23-2021, 03:43 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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