[IPython-dev] metadata attribute for streams
Jason Grout
jason-sage at creativetrax.com
Thu Jun 28 16:54:28 EDT 2012
On 6/28/12 2:12 PM, Jason Grout wrote:
> We'd like to attach some
> metadata to stdout and stderr messages, for example, indicating where
> the frontend should put the output. It would be really convenient if
> sys.stdout and sys.stderr (which I think is
> IPython.zmq.iostream.OutStream, right?) had a 'metadata' attribute that
> could be set and would be added to each outgoing message. This would
> also change the messaging spec to add a 'metadata' attribute to the
> content dict for stream messages (just like display_data messages
> already have).
>
> We'd use it something like this (not tested...):
I went ahead and submitted a small 6-line pull request for you to test
out. https://github.com/ipython/ipython/pull/2051
Of course, docs, tests, and possibly other places in the code need to be
updated. I want to make sure you guys are okay with the idea first, though.
Jason
More information about the IPython-dev
mailing list