libblender (blender in python)

I have put together the beginnings of libblender (with the help of IdeasMan). There is an issue with WM_init, causing a segfault, i need some help understanding this problem. I’m coding for both ctypes and RPython. Anyone willing to join the effort should contact me, the tentative goal is to wrap the complete C API, i think the best way is by hand, but i’m looking at some automatic code generators to, still going through a process of trial and error at this point.

http://pastebin.com/SRKRPB17