The pyrtmidi module is now complete, offering both a blocking or non-blocking getMessage(timeout_ms=None) and setCallback(func) option. As far as I know, this is now the only complete python midi I/O extension.

I have not compiled it on windows (in fact it probably won’t compile), have not compiled on linux (but it probably works), and the code passes initial tests on mac but other reports are more than welcome.

http://trac2.assembla.com/pkaudio/wiki/pyrtmidi

Thank you all for your patches, and have fun using midi hardware in your apps!