Skip to content

Instantly share code, notes, and snippets.

@technic
Created September 12, 2019 12:54
Show Gist options
  • Save technic/48f54562249ca88f71a928193223d55e to your computer and use it in GitHub Desktop.
Save technic/48f54562249ca88f71a928193223d55e to your computer and use it in GitHub Desktop.
ipywidgets decorator with continuous_update = False
from ipywidgets import interact
def interact_delayed(**kwargs):
def decorator(f):
obj = interact(f, **kwargs)
for child in obj.widget.children:
if hasattr(child, 'continuous_update'):
child.continuous_update = False
return obj
return decorator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment