[IPython-dev] magics and metadata

Jonathan Taylor jonathan.taylor at stanford.edu
Fri Jun 22 03:50:34 EDT 2012


> Back to the question of output-level metadata.  When a bit of code
> remains unused for almost a year, I start to question whether we
> really need it.  I not convinced we don't need it, I am not sure.  In
> light of this, I don't think that adding it to the notebook format
> makes sense.  When one of us finds a good purpose for this metadata,
> let's add it to the nbformat them.
>

I agree that output metadata might not be that useful, but I think it would
be useful
to be able to add metadata to the output of any "execute" on an ipython
kernel where by
execute I mean anything that passes a string to an ipython kernel.

The notebook is only one frontend that passes a string to ipython and the
notebook
is such that the return value is a NotebookNode which allows the
possibility of metadata and there
is not even any way to set that metadata via a mechanism like
"publish_display_data".

But, "publish_display_data" appends something to the output of the result
of executing "chunk" that all
frontends have to deal with. Why can't there be something that adds
something (i.e. metadata) to the result
of executing "chunk" that all frontends have to deal with (and most can
ignore if they want). It would be like
a silent "publish_display_data"...

Jonathan

-- 
Jonathan Taylor
Dept. of Statistics
Sequoia Hall, 137
390 Serra Mall
Stanford, CA 94305
Tel:   650.723.9230
Fax:   650.725.8977
Web: http://www-stat.stanford.edu/~jtaylo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20120622/096d98bd/attachment.html>


More information about the IPython-dev mailing list