can now use PyCogent within the IPython notebook

[FIXED] trap stream IOErrors that arise in IPython notebook

--HG--
extra : rebase_source : 66b156b11ab8678306047dced17b06245baee7cf