Monotonous.org

Eitan’s Pitch

Introducing Pyia

July 1st, 2008 Filed under: Accessibility, Software, Technology by Eitan

Last week I was doing my best to dive into the wonderful world of Windows accessibility. So to flatten the curve, I decided to take shot at making a lightweight Python MSAA client library, Pyia.

It is heavily inspired by pyatspi’s class mixins. pyOrbit made it very easy to do this in pyatspi, making CORBA friendly and Pythonic. Comtypes, does the same in Windows, making COM cool as a cucumber.

Accessible objects emulate containers for easy access to children nodes. Also notice a few convienient methods, like getDesktop which returns the desktop client. Also getStateName will return a human readable list of states rather than a bitmask.

>>> import pyia
>>> desktop = pyia.getDesktop()
>>> for window in desktop:
        if not window.accState(0) & \
          pyia.STATE_SYSTEM_INVISIBLE:
          print window
 
[window | ]
[window | Python Shell]
[window | Mozilla Firefox Start Page - Mozilla Firefox]
[window | Program Manager]
 
>>> desktop[14].accStateName()
u'unavailable invisible'

This might be a bad idea, but I added some AT-SPI concepts, for example a registry, where you connect event callbacks. Also, events are wrapped in structures with a “source” field that is a reference to the accessible that is responsible for the event. There is no extra wire traffic because the reference is not retrieved until the source field is either explicitly called, or the event is printed (converted to a string).

>>> import pyia
>>> def event_cb(event):
        print event
 
>>> pyia.Registry.registerEventListener(
        event_cb, pyia.EVENT_OBJECT_FOCUS)
>>> pyia.Registry.start()
gainFocus
        source: [client | Mozilla Firefox Start Page - Mozilla Firefox]
        window: 524618
        thread: 568
        tstamp: 14692927
gainFocus
        source: [client | Python Shell]
        window: 1573178
        thread: 352
        tstamp: 14694599
>>>

You could try this stuff out by checking it out from Github.
If that is too much overhead, here is a binary Windows installer.

You will need the comtypes Python module.

6 Comments »

I *heart* Translators

June 12th, 2008 Filed under: Software, Technology by Eitan

I know that I am supposed to be all gratuitous and all when it comes to translators who do a thankless job, and improve software by orders of magnitude to make them accessible to many locales. I usually am very thankful.

In the past month I have briefly turned my back Accerciser trunk, and in that time some cuddly translator managed to bugger it not once, but twice.

Once when someone uncommented a comment in the LINGUAS file, which resulted in an unconfigurable tree. Another time when someone changed a *.po file to have executable permissions. This was more annoying, since there is some script there in s.g.o’s guts that rejects any commit if the repo has an executable. Now you know me, I never look at the output message after I commit to SVN, especially now since I am doing it through git. Result: all my commits to Accerciser in the last month have been rejected, and I never realized it.

I know what you all are thinking:

  1. Why don’t you just look into the Subversion history, and see who is messing with you? Well, I prefer to remain ignorant, and make sweeping accusations - I am bored.
  2. How in hell did an executable po file get into the repo in the first place? I don’t know, and searching for the answer might lead me to the answer of the first question, so I won’t bother.

4 Comments »

Twinkle And Twitter

April 30th, 2008 Filed under: Personal, Technology by Eitan

About a week back I downloaded an app for my iPhone called Twinkle. It’s a Twitter client with two catches: It allows you to geotag posts, and it allows you to take attach photo snaphots of whatever it is you are doing. Both of these features make Twinkle a real great toy. It is a lot of fun browsing the twitters within a one mile radius, and trying to make out from the photos where the picture was taken. It really puts a whole new dimension to social networking.

The downside is that there is no way to relay this experience to non-iPhone users. So I made a few Yahoo pipes that mash up the photo with the proper twitters. This is my personal feed.

You could create new feeds from my pipes page.

No Comments »

CSUN Fun

March 14th, 2008 Filed under: Accessibility, Personal, Technology by Eitan

I spent most of this week at CSUN. It’s been fun, I am really happy to finally meet a bunch of people, and to meet new folks. Manning the Mozilla booth is easy: every passerby is a grateful user. A lot of subdued dogs.

A companion dog taking a rest

Update: I Made that sound like past tense. I still am at CSUN, and I will be here till tomorrow.

1 Comment »

Accessibility in Linux Journal

February 19th, 2008 Filed under: Accessibility, Personal, Software, Technology by Eitan

As Will pointed out, the latest issue of Linux Journal is focusing on the desktop, with not one, but two articles devoted to desktop accessibility! If I read the contract that I signed hastily right, I keep the copyright for the article, so I could post it here.

No Comments »

  • Photos

  • Categories

  • Archives