[IPython-User] IPython widget Dict not syncing

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[IPython-User] IPython widget Dict not syncing

Aaron Watters-3
I’m playing around with I-Python interactive widgets — very cool!

I’m having trouble passing dictionaries from the Python side to the JS side.
For some reason I can get a List to sync from the python side to the javascript side like so:

Py:    commands = List([], sync=True)

Js:  var commands = this.model.get("commands”);

But the same doesn’t seem to work with Dict

Py:      style = Dict({}, sync=True)

I’m pretty sure I’m using JSON compatible values and I’m changing the top level reference to get traitlets to notice that the value has changed.  I wouldn’t rule out that I’m doing something else dumb, however.

For fun I just changed the code to pass a dictionary wrapped in a list and it worked.  Any idea what is wrong?  Thanks!
  — Aaron Watters

IPython-User mailing list
[hidden email]