outputs icon indicating copy to clipboard operation
outputs copied to clipboard

Add support for Output widgets

Open captainsafia opened this issue 6 years ago • 3 comments

Context: Found this while going through the Output Widget.ipynb example notebook.

Currently, if an Output widget is initialized, stdout and stderr streams are not redirected to it.

captainsafia avatar Oct 28 '19 17:10 captainsafia

Are you able to get the Output widget to render? I get an issue where it tries to access a library that we don't have in the project, I think like jupyter-widget/output or something. This part looks like an easy enough fix but I wanted to check that you hadn't done this already in an unmerged PR.

miduncan avatar Nov 04 '19 22:11 miduncan

Yeah, this is what I'm working on at the moment. This and parts of nteract/nteract#4645 as well as parts of nteract/nteract#4648 are related to this.

The Output widget has to be implemented by us and needs to hook into our execute epics and state to redirect outputs correctly.

captainsafia avatar Nov 04 '19 22:11 captainsafia

Updating the name of this issue and transferring it to the outputs package where the jupyter-widgets transform leaves now.

I started taking a look at implementing this in the fall and it was....messy. An output widget is essentially a transform within a Jupyter widget. Adding support for this in a way that is maintainable and easy to reason about is challenging for a couple of reasons:

  • The Output widget usurps the standard output handling of the application it is in
  • We have to re-implement support for our output rendering logic in the Output widget somehow

I started this work in https://github.com/nteract/nteract/pull/4679 but tabled it after realizing how difficult it was to integrate into our package system.

captainsafia avatar May 05 '20 16:05 captainsafia