On Monday, April 22, 2019 at 4:35:06 PM UTC-7, Jason Grout wrote: > > 2. The execute_result vs display_data difference you see is from how you > evaluated things. execute_result basically returns the result of displaying > the last line of execution. display_data messages come from explicitly > displaying something. To see the display_data message, do something like > `display(HTML(...))`. > > OK. So suppose we have the following scenario
[Input:] ?SomeCommand Desired output: Help for SomeCommand <http://dummy/help.html?query=SomeCommand> Presently, this is generated by a do_execute amounting to: self.send_response(self.iopub_socket, 'display_data', content) return {'status': 'ok', 'execution_count': self.execution_count, 'payload': [], 'user_expressions': {}} where "content" is a dictionary that successfully encodes the information for displaying the desired "<a href...". Would it be more appropriate to send an 'execute_result' response instead? Does it matter? Would it just be a matter of replacing 'display_data' with 'execute_result'? -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/b5b5b2e3-55f5-4ee3-b948-e0b6a826ee24%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
