Using the Accessibility Framework from Python
The following is the boilerplate code needed to start using the a11y interfaces.
import ORBit
import bonobo, gnome
ORBit.load_typelib('Accessibility')
gnome.init('list-apps', '0.0')
REGISTRY_IID = 'OAFIID:Accessibility_Registry:1.0'
registry = bonobo.activation.activate("iid == '%s'" % REGISTRY_IID)
We can then get a reference to the desktop with:
desktop = registry.getDesktop(0)