Wow, what a nice coincidence to see this on HN! Just two days ago, I was hacking up a similar project. https://github.com/livetheoogway/python-uime
This one is a much smaller hack to spruce up your local scripts. Although it's still a work in progress with features pending, I'd really appreciate any initial feedback or thoughts. Thanks for checking it out!
[0] https://github.com/livetheoogway/python-uime