April 14, 2008 at 12:37PM Lithium 006 patches
This won’t be of any interest to anybody except those of use who use ROX and Ken Hayber’s Lithium applet. These patches are against Lithium 006, which isn’t advertised on its homepage, but which is downloadable here.
There’s four patches. The first one patches acpi.py to use modern exceptions. By modern exceptions, I mean changing NotImplemented into NotImplementedError, which as been around since Python 1.5.2, which was released nine years ago. ![]()
The second patch is more substantial. It reworks how Lithium deals with battery backends by creating a generic uniform interface to them all, altering the backends to check for their suitability to the system they’re running on, and exposing a single function that can be used to query for a suitable backend. This is much cleaner than the current system, which has battery.py (the applet itself) knowing far more about the backends than it really should. The changes in this patch made the next two patches much easier.
The third and fourth patches add two new backends. The first backend is one that uses the FreeBSD apm command to query the current battery state. The second new backend uses HAL to query the battery state in a platform independent manner.
Update: I was chatting with Ken Hayber over email, and he told me that he’s stopped using ROX, so he’s no longer maintaining Lithium or his other ROX applets. If I’ve the time, I might take over maintainership of a couple of them. I’ve cloned the repositories, just in case.
No comments.