You'll need acpi installed:<div><br></div><div><div>In [6]: import subprocess</div><div><br></div><div>In [7]: p = subprocess.Popen('acpi', stdout=subprocess.PIPE)</div><div><br></div><div>In [8]: output, errors = p.communicate()</div>
<div><br></div><div>In [9]: print output</div><div>------> print(output)</div><div>Battery 0: Full, 100%, rate information unavailable</div><div><br></div><div><br></div><br><div class="gmail_quote">On Sat, Feb 13, 2010 at 8:43 PM, Daniel Dalton <span dir="ltr"><<a href="mailto:d.dalton@iinet.net.au">d.dalton@iinet.net.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Sat, Feb 13, 2010 at 05:26:02PM -0800, Chris Rebert wrote:<br>
> It's probably gonna depend on which OS you're running. Which would be...?<br>
<br>
</div>Sorry, forgot to mention this. I'm running debian linux.<br>
<br>
Thanks,<br>
Dan<br>
<div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br></div>