@omz AVFoundation seems to use a lot of blocks.
i havent tried it yet, but is it possible to create NSBlocks at runtime from python?
see for example
http://stackoverflow.com/questions/20134616/how-are-nsblock-objects-created
http://www.cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
http://stackoverflow.com/questions/17813870/how-does-a-block-capture-the-variables-outside-of-its-enclosing-scope
sounds like blocks are just c structs, which we can create with ctypes, with a pointer to an invoke function, and a structure with pointers or values of captured variables. memory management may be tricky.