talideon.com

Carpal tunnel syndrome

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. [smile]

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.

Download Lithium 006 patches.

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.

Technorati Search Technorati Search Irish Bloggers

Comments

No comments.

Post a comment

All form information is optional, but it’s a good idea to fill in your name and email address if you want me to take your comment seriously.

Spammers, don’t bother posting crap down here. The site is set up so that legitimate search engines (Google, for instance) won’t index pages with comments on them. Posting crud here only means you’re wasting my time and patience. Shoo!

Real names, please. Please include!
Won’t be displayed. Please include!
Displayed, if present.