Thread: Battery info on macbook
08-25-2010, 11:17 AM #1
Battery info on macbook
- Member Since
- Aug 25, 2010
Does anybody know how to get info on the battery of a macbook in python or PyObj? Or maybe ObjC so I can wrap it in python?
I need the battery percentage and if the battery is charging, discharging or charged.
I can do
import subprocess process = subprocess.Popen(['pmset', '-g', 'pslog'], shell=False, stdout=subprocess.PIPE) print process.stdout.readline()
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
By tape in forum Apple NotebooksReplies: 7Last Post: 07-28-2013, 08:31 PM
By salvadore in forum Apple NotebooksReplies: 2Last Post: 11-29-2011, 05:07 PM
By justw8_4theicar in forum Apple NotebooksReplies: 1Last Post: 10-25-2011, 01:50 PM
By oak3x in forum Apple NotebooksReplies: 2Last Post: 03-07-2010, 05:21 PM
By sixpmtvwatcher in forum Apple NotebooksReplies: 1Last Post: 02-10-2008, 01:15 PM