0

I'm using the ipyvuetify lib to display dashboards in a Jupyter+voila environment.

In my last app, I make a call to a method that print information about computation in stdout and I would like to redirect it to a Unicode trait (which is then used in an Alert object.

To create a sandbox scenario I would like to have the same scenario as with an Output object from ipywidget:

from ipywidgets import Output
from traitlets import Unicode

str_ = Unicode("").tag(sync=True)

out = Output()
with out:
    print("toto")
    print("tutu")

Why cannot I use the Ouput ?

Because Ipyvuetify uses traitlets to communicate with the frontend and Ouput rendering cannot be customized (pre element remain white which is impossible to read on blue bacjground).

why don't I listen to Ouput ?

the Output object has a outputs trait but is a Tuple which is not triggering changes with the classic observe method.

Pierrick Rambaud
  • 1,726
  • 1
  • 20
  • 47

0 Answers0