updating interact control

9 views
Skip to first unread message

Fred Gruber

unread,
Dec 18, 2013, 5:28:30 PM12/18/13
to sage-s...@googlegroups.com
I would like to change the contents of a selector depending on other controls. For example,

    import numpy as np
    c = [1,2,3]
    @interact
    def _(a =selector(c),
          b = slider(5, 10, default=0):
          global c
         c=np.arange(0,b)
         print c

I would like the content of the selector 'a' to depend on what value b have.

Is there any way to update a control dynamically?

thanks
Fred
Reply all
Reply to author
Forward
0 new messages