On Sun, Feb 14, 2010 at 03:22:11AM +0100, Daniel Fetchinson wrote:
> /proc/acpi/battery/BAT0/info
> /proc/acpi/battery/BAT0/state
Had a quick look, but that path doesn't seem to exist, I'll look harder
on the weekend when I put the script together, because it has to be
somewhere.
Thanks,
Dan
--
I'm not sure I have those files, but I'll look a little harder this
weekend when I put together the script.
Thanks for your help,
Dan
On Sat, Feb 13, 2010 at 08:23:28PM -0600, Tim Chase wrote:
> Daniel Dalton wrote:
> >On Sat, Feb 13, 2010 at 05:26:02PM -0800, Chris Rebert wrote:
> >>It's proba
On Sat, Feb 13, 2010 at 09:19:59PM -0500, Chris Colbert wrote:
>You'll need acpi installed:
>In [6]: import subprocess
Thanks for that code, I'll try putting something together this weekend.
Dan
--
http://mail.python.org/mailman/listinfo/python-list
Daniel Dalton 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.
You should be able to read/poll the various files in
/proc/acpi/battery/BA
>> It's probably gonna depend on which OS you're running. Which would be...?
>
> Sorry, forgot to mention this. I'm running debian linux.
I don't know about python modules but have a look at
/proc/acpi/battery/BAT0/info
/proc/acpi/battery/BAT0/state
You can parse the numbers you want from there.
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 D
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
I too am interested as to which module should I use. My OS is OS X Snow
Leopard.
On Sun, Feb 14, 2010 at 6:56 AM, Chris Rebert wrote:
> On Sat, Feb 13, 2010 at 4:48 PM, Daniel Dalton
> wrote:
> > Hi,
> >
> > I'm constantly working in the command line and need to write a program
> > to give me a
On Sat, Feb 13, 2010 at 4:48 PM, Daniel Dalton wrote:
> Hi,
>
> I'm constantly working in the command line and need to write a program
> to give me alerts on my battery. Can someone please tell me what module
> I should use to access battery information? Looking for something that
> perhaps makes
Hi,
I'm constantly working in the command line and need to write a program
to give me alerts on my battery. Can someone please tell me what module
I should use to access battery information? Looking for something that
perhaps makes use of acpi so I can get estimated time left as well as a
percenta
10 matches
Mail list logo