That works perfectly Jason, thanks! I also goofed up by not putting the comm.send inside the on_msg callback for some reason, which is what I had original wanted. Appreciate the help!
On Monday, 8 May 2017 20:34:22 UTC-7, Jason Grout wrote: > > Ah, right. In order to see output, you'll need to set the right javascript > callbacks to handle the resulting display messages. I think if you make > your python handler write to a file, you'll see the output in the file. > Alternatively, you can use an Output ipywidget to capture the output: > > from ipywidgets import Output > out = Output() > def handle_comm_message(message): > with out: > print(message) > > and then display the output widget in another cell somewhere > > Thanks, > > Jason > > > On Mon, May 8, 2017 at 12:16 PM Dominic Kuang <[email protected] > <javascript:>> wrote: > >> Thanks for the reply Jason. I tried switching the cells and randomly >> trying different execution orders but to no avail. If I'm not wrong, I >> should expect to see something printed in the output cell from the Python >> callback being triggered. >> >> >> On Friday, 5 May 2017 15:03:25 UTC-7, Jason Grout wrote: >> >>> Try switching your cell one and two. >>> >>> (Sorry, on phone so can't test) >>> >>> Thanks, >>> >>> Jason >>> >>> On Fri, May 5, 2017, 09:54 Dominic Kuang <[email protected]> wrote: >>> >> I've uploaded the notebook here for convenience. >>>> http://nbviewer.jupyter.org/gist/finaiized/ad8836b64a874518d32c40e7a4a03966 >>>> >>>> -- >>>> 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/f2c16cc5-b8bf-4ae4-9084-adab48d1dbce%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/jupyter/f2c16cc5-b8bf-4ae4-9084-adab48d1dbce%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- 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/0ea5ee7c-2400-4f65-b167-26d9b67bf561%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
