acpi.py

acpi.py provides an uniform and platform-independent interface to ACPI.
Download

acpi.py Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Tilo Riemer
  • Publisher web site:
  • http://www.crossvc.com/

acpi.py Tags


acpi.py Description

acpi.py provides an uniform and platform-independent interface to ACPI. acpi.py provides an platform-independent and uniform interface to ACPI.Installation:Linux 2.4 / 2.6The Linux implementation reads informations from /proc/acpi/. Therefore a low level modul is not needed. Copy the file acpi.py from the acpi.py directory into your Python directory/site-packages (in most cases you must be root for that).Be sure that the needed ACPI drivers are loaded (on laptops usually battery). You will have subdirectories in /proc/acpi/. That's all. Note: We have not tested acpi.py elaborately on Linux 2.6.Requirements:· Python >= 2.0· Linux Kernel 2.4.x (not elaborately tested with kernel 2.6)Usage:Usage is simple. Do something like the following:import acpibattery = acpi.Acpi()...battery.update()print battery.percent()print battery.capacity()print battery.nb_of_batteries()print battery.charging_state()Note that you have to call update() if you want get the current state of battery. Note furthermore that acpi raises exceptions in some cases. Please take a look into the short and well readable source file acpi.py.What's New in This Release:· A bug in the AcpiLinux.estimated_lifetime() function has been fixed.


acpi.py Related Software