def publish(self, source, data, metadata=None): self._flush_streams() if metadata is None: metadata = {} self._validate_data(source, data, metadata) content = {'source': source, 'data': encode_images(data), 'metadata': metadata} self.session.send( self.pub_socket, u'display_data', json_clean(content), parent=self.parent_header, ident=self.topic, )
def publish(self, source, data, metadata=None): self._flush_streams() if metadata is None: metadata = {} self._validate_data(source, data, metadata) content = {} content["source"] = source content["data"] = encode_images(data) content["metadata"] = metadata sendMessage("iopub", "display_data", content=json_clean(content), parent_header=self.parent_header)
def publish(self, source, data, metadata=None): self._flush_streams() if metadata is None: metadata = {} self._validate_data(source, data, metadata) content = {} content['source'] = source content['data'] = encode_images(data) content['metadata'] = metadata iopub_output.put(CreateMessage('display_data', content=json_clean(content), parent_header=self.parent_header))
def publish(self, source, data, metadata=None): self._flush_streams() if metadata is None: metadata = {} self._validate_data(source, data, metadata) content = {} content['source'] = source content['data'] = encode_images(data) content['metadata'] = metadata sendMessage('iopub', 'display_data', content=json_clean(content), parent_header=self.parent_header)
def publish(self, data, metadata=None, source=None): self._flush_streams() if metadata is None: metadata = {} self._validate_data(data, metadata) content = {} content["data"] = encode_images(data) content["metadata"] = metadata self.session.send( self.pub_socket, u"display_data", json_clean(content), parent=self.parent_header, ident=self.topic )
def publish(self, source, data, metadata=None): self._flush_streams() if metadata is None: metadata = {} self._validate_data(source, data, metadata) content = {} content['source'] = source content['data'] = encode_images(data) content['metadata'] = metadata self.session.send( self.pub_socket, u'display_data', json_clean(content), parent=self.parent_header, ident=self.topic, )
def write_format_data(self, format_dict): self.msg['content']['data'] = encode_images(format_dict)
def write_format_data(self, format_dict, md_dict=None): self.content['data'] = encode_images(format_dict) self.content['metadata'] = md_dict
def write_format_data(self, format_dict, md_dict=None): self.msg['content']['data'] = encode_images(format_dict) self.msg['content']['metadata'] = md_dict
def format(value): format = InteractiveShell.instance().display_formatter.format return encode_images(format(value)[0])
def write_format_data(self, format_dict): self.msg["content"]["data"] = encode_images(format_dict)
def write_format_data(self, format_dict, md_dict=None): self.msg["content"]["data"] = encode_images(format_dict) self.msg["content"]["metadata"] = md_dict