I want to know if there is any library in python which can get me battery percentage remaining in Apple MACOSX(El'captain). I have researched a bit and found wmi for windows but could not find anything for MAC. Any leads appreciated.
Asked
Active
Viewed 2,376 times
1 Answers
0
A nice Python package power is available if you want to get it done quickly.
Also, you can try to execute the command line function pmset -g batt
using Python subprocess
module.
Finally, if you prefer, you can call the OS X native library C
functions, see Battery status in OSX?.
-
Exactly what I was searching for. – Pankaj Mishra Feb 21 '17 at 07:48
-
I was looking for the bash command, thank you. – Franco Gil Feb 07 '23 at 14:48