Skip to content

Instantly share code, notes, and snippets.

@alexjc
Created December 6, 2014 10:40
Show Gist options
  • Save alexjc/57fc2336ad3327a9a594 to your computer and use it in GitHub Desktop.
Save alexjc/57fc2336ad3327a9a594 to your computer and use it in GitHub Desktop.
VisPy IPython Notebook Integration
#
# Add into IPython 3.x eventloops.py
#
@register_integration('vispy')
def loop_vispy(kernel):
"""Start a kernel using a VisPy backend."""
import vispy.app
vispy.app.use_app(backend_name='glfw')
t = vispy.app.Timer(interval=kernel._poll_interval, start=True)
t.connect(lambda evt: kernel.do_one_iteration())
vispy.app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment