[Tutor] Can python determine Battery or AC Power?
Luke Paireepinart
rabidpoobear at gmail.com
Wed Oct 28 22:19:09 CET 2009
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 <nrhird at 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 at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091028/8239ac6b/attachment-0001.htm>
More information about the Tutor
mailing list