You'll need acpi installed:

In [6]: import subprocess

In [7]: p = subprocess.Popen('acpi', stdout=subprocess.PIPE)

In [8]: output, errors = p.communicate()

In [9]: print output
------> print(output)
Battery 0: Full, 100%, rate information unavailable



On Sat, Feb 13, 2010 at 8:43 PM, Daniel Dalton <d.dal...@iinet.net.au>wrote:

> On Sat, Feb 13, 2010 at 05:26:02PM -0800, Chris Rebert wrote:
> > It's probably gonna depend on which OS you're running. Which would be...?
>
> Sorry, forgot to mention this. I'm running debian linux.
>
> Thanks,
> Dan
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to