October 8th, 2005

face

learning dbus/python

For some reason today I decided to go learn python so I could learn about dbus without having to worry about hacking up a load of C code.

So I wrote my first dbus client/server that does some really basic modesetting (and I mean basic total code is 58 lines of python)

The server reads the modelist from /sys/class/graphics/fb0/modes

The client gets the modelist, picks one and send back a number, the server then writes the mode into /sys/class/graphics/fb0/mode.

But at least now I've gotten some semi-usable python skills, and a bit of a clue what dbus is about...

(I said I'd learn python in an afternoon, I actually slept for about 3-4 hrs of it due to to being up early and jogging/walking the 10km from Manly to the Spit Bridge carrying about 2-3 kg in my bag, I went to Manly by ferry to dive, the weather wasn't accomodating me, so I said I'd do something semi-healthy and hike some of the trail back.)