If you're on Windows and you can find an example using the Win32 api (in C++ for example) you can use pywin32 module to do the same thing through python. It's a little complicated sometimes though. So what O.S. are you on?
On Wed, Oct 28, 2009 at 4:15 PM, Nick Hird <nrh...@gmail.com> wrote: > Is there a way in python to tell if the power source for a laptop is > ac or battery? I am trying to write a small script to print out my > system stats and would like to know if the laptop is on battery power > or using ac power. I just dont know enough python to know where to > look for that info. > > Thanks! > -Nick > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor