In [1]:
from seamless.highlevel import Context
ctx = Context()

In [2]:
from ipywidgets import IntSlider, IntText

In [3]:
ctx.a = 20
#ctx.a.celltype = "float"
ctx.b = 30
#ctx.b.celltype = "float"
def add(a,b):
    try:
        import time; time.sleep(0.1)
    except SystemError:
        pass
    return a + b
ctx.func = add
ctx.func.a = ctx.a
ctx.func.b = ctx.b
ctx.c = ctx.func
#ctx.c.celltype = "float"
await ctx.translation()

In [7]:
from IPython.display import display
a = IntSlider(min=-10,max=30,step=1,value=10)
b = IntSlider(min=-10,max=30,step=1,value=10)
c = IntText()
ctx.a.traitlet().link(a)
ctx.b.traitlet().link(b)
ctx.c.traitlet().connect(c)
display(a)
display(b)
display(c)



In [5]:
ctx.c.output()



In [6]:
ctx.a = -2