environment/lib/python2.7/site-packages/IPython/frontend/qt/console/rich_ipython_widget.py
def _handle_pyout(self, msg):
        """ Overridden to handle rich data types, like SVG.
        """
        if not self._hidden and self._is_from_this_session(msg):
            content = msg['content']
            prompt_number = content.get('execution_count', 0)
            data = content['data']
            if data.has_key('image/svg+xml'):
                self._pre_image_append(msg, prompt_number)
                self._append_svg(data['image/svg+xml'], True)
                self._append_html(self.output_sep2, True)
            elif data.has_key('image/png'):
                self._pre_image_append(msg, prompt_number)
                self._append_png(decodestring(data['image/png'].encode('ascii')), True)
                self._append_html(self.output_sep2, True)
            elif data.has_key('image/jpeg') and self._jpg_supported:
                self._pre_image_append(msg, prompt_number)
                self._append_jpg(decodestring(data['image/jpeg'].encode('ascii')), True)
                self._append_html(self.output_sep2, True)
            else:
                # Default back to the plain text representation.
                return super(RichIPythonWidget, self)._handle_pyout(msg)
def _handle_pyout(self, msg):
        """ Overridden to handle rich data types, like SVG.
        """
        if not self._hidden and self._is_from_this_session(msg):
            content = msg['content']
            prompt_number = content.get('execution_count', 0)
            data = content['data']
            if data.has_key('image/svg+xml'):
                self._pre_image_append(msg, prompt_number)
                self._append_svg(data['image/svg+xml'], True)
                self._append_html(self.output_sep2, True)
            elif data.has_key('image/png'):
                self._pre_image_append(msg, prompt_number)
                self._append_png(decodestring(data['image/png'].encode('ascii')), True)
                self._append_html(self.output_sep2, True)
            elif data.has_key('image/jpeg') and self._jpg_supported:
                self._pre_image_append(msg, prompt_number)
                self._append_jpg(decodestring(data['image/jpeg'].encode('ascii')), True)
                self._append_html(self.output_sep2, True)
            else:
                # Default back to the plain text representation.
                return super(RichIPythonWidget, self)._handle_pyout(msg)
Overridden to handle rich data types, like SVG.