Show More
@@ -263,8 +263,12 b' class ZMQTerminalInteractiveShell(TerminalInteractiveShell):' | |||
|
263 | 263 | hook.finish_displayhook() |
|
264 | 264 | |
|
265 | 265 | elif msg_type == 'display_data': |
|
266 |
|
|
|
267 | ||
|
266 | data = sub_msg["content"]["data"] | |
|
267 | handled = self.handle_rich_data(data) | |
|
268 | if not handled: | |
|
269 | # if it was an image, we handled it by now | |
|
270 | if 'text/plain' in data: | |
|
271 | print(data['text/plain']) | |
|
268 | 272 | |
|
269 | 273 | _imagemime = { |
|
270 | 274 | 'image/png': 'png', |
@@ -276,10 +280,7 b' class ZMQTerminalInteractiveShell(TerminalInteractiveShell):' | |||
|
276 | 280 | for mime in self.mime_preference: |
|
277 | 281 | if mime in data and mime in self._imagemime: |
|
278 | 282 | self.handle_image(data, mime) |
|
279 | return | |
|
280 | # if it was an image, we handled it by now and returned | |
|
281 | if 'text/plain' in data: | |
|
282 | print(data['text/plain']) | |
|
283 | return True | |
|
283 | 284 | |
|
284 | 285 | def handle_image(self, data, mime): |
|
285 | 286 | handler = getattr( |
General Comments 0
You need to be logged in to leave comments.
Login now