Closed mwcraig closed 7 years ago
The description attribute has been dropped but one can set_title.
description
set_title
The traceback is, in part:
~/Development/astronomy/reducer-notebook/reducer/image_browser.py in _create_gui(self) 155 old_parent = parent 156 grandparent = old_parent.parent --> 157 desc = old_parent.description 158 s_or_not = ['', 's'] 159 n_files = len(index) AttributeError: 'Accordion' object has no attribute 'description'
See this for an example of how to make this work:
a = ipw.Accordion() b = ipw.Accordion() c = ipw.Accordion() b_1 = ipw.Accordion() b_2 = ipw.Accordion() c_kids = [ipw.Label(value="c-sub {}".format(i), description="Moo {}".format(i)) for i in range(10)] c.children = c_kids _ = [c.set_title(i, kid.value) for i, kid in enumerate(c.children)] b.children = [b_1, b_2] b.set_title(0, "b_1") b.set_title(1, "b_2") a.children = [b, c] a.set_title(0, "b") a.set_title(1, "c")
Well, that was easier to fix than I expected. Just did a simple monkey-patch adding a description to each accordion and box, and done!
The
description
attribute has been dropped but one canset_title
.The traceback is, in part:
See this for an example of how to make this work: