[IPython-dev] Re: Changes to Notebook Format

Fernando Perez Fernando.Perez at colorado.edu
Tue Aug 2 12:56:57 EDT 2005


Hans Meine wrote:
> On Monday 01 August 2005 21:51, Fernando Perez wrote:
> 
>>mmh, scratch that.  Upon thinking a bit more, it seems to me that since our
>>output proxies have to trap all write() calls, [...]
> 
> BTW: Did you find a way to catch stderr output from binary extension modules?
> In our terminal we just redirected sys.stderr, which does not effect our C++ 
> extensions. :-(
> 
> Maybe it's possible to redirect the file descriptors?
> 
> In that case, would we have a problem with buffering, or does that happen 
> after writing.. no.  The iostreams library will already buffer output I 
> guess. :-(
> 
> An idea worth thinking about though.  (Otherwise, extension module which 
> containt printf's or cerr << "sth." will output to the terminal that started 
> the IPython GUI.  That's not optimal, but at least none of the standard 
> modules do such things AFAICS.. ;-) Oh yes - the version mismatch warning 
> from Python could be an example!)

I don't know how to trap 'cerr << foo' calls from python.  I tried some simple 
tricks with file descriptors at some point, but failed.  It may be possible to 
do it with the proper incantation, but my quick attempts have been so far 
unsucessful.

Cheers,

f




More information about the IPython-dev mailing list