Python and C ctypes stdout captured in IPython Notebook - https://stackoverflow.com/questions/35745541