[IPython-dev] ipython1 and synchronous printing of stdout

Gael Varoquaux gael.varoquaux@normalesup....
Sun Jul 20 14:27:02 CDT 2008

> I can off course monkey patch the output_trap with my own write method,
> but this seems a bit ugly. What do the ipython1 developpers think the
> right way of doing this (and maybe modifying output_trap) is?

I went ahead experimenting, and created a subclass of output_trap gear
towards printing via a callback, as can be seen on

I hope this approach is OK. By passing this this output_trap to the
interpreter I get the desired result, and I sync this approach is
reusable for any synchronous frontend, such as the one into which
ipython0 will, hopefully, morph one day.


More information about the IPython-dev mailing list