These are chat archives for ipython/ipython

23rd
Oct 2015
Alejandro Guerrero Gonzalez
@aggFTW
Oct 23 2015 20:17
Hi! I need some help implementing a wrapper kernel :)
I am creating a wrapper kernel that returns pandas dataframes and images
I was looking at the EchoKernel and saw that it was sending a message to iopub
but that's not what ipykernel does, as ipykernel is using the shell.display_hook to return results, right?
the thing is, what mimetype should I provide? does it matter? and how can I return the rich representations of the objects?
I tried this, but the result shows up empty:
        content = {
            # The counter for this execution is also provided so that clients can
            # display it, since IPython automatically creates variables called _N
            # (for prompt N).
            'execution_count' : self.execution_count,

            # data and metadata are identical to a display_data message.
            # the object being displayed is that passed to the display hook,
            # i.e. the *result* of the execution.
            'data' : repr(result),
            'metadata' : {},
        }
        self.send_response(self.iopub_socket, u'execute_result', content)
where result is the pandas dataframe or the image for example
I hope this is the right forum. Any help would be appreciated!
Sylvain Corlay
@SylvainCorlay
Oct 23 2015 21:28
@minrk I noticed that readthedocs.org points to the tip of master for traitlets
It is just a change in a dropdown in the preferences to change it to the stable