Ars est celare artem.
Mon, 08 Sep 2008
new_list = [fn(item) for item in a_list
if condition(item)]
result = ''.join(fn(i) for i in items)
(found in Code Like a Pythonista: Idiomatic Python)
Mon, 28 Jul 2008
Have you ever thoght about patching an input driver (keyboard, mouse, joypad, ...)?
The answer is uinput and evdev.
The first one is a dummy device being created in /dev/input/uinput that allow you to create a totally new input device with whathever control you want. E.g if you want to have a mouse controlled from a socket or from bluetooth you can! That device will be identical to any other "common" input device.
The other interesting device is event device. Every input device has it's own event device in /dev/input. This allow you to catch those event and make anything you want.
here there's an example.
And here a collection of related links.