Created
December 6, 2014 10:40
-
-
Save alexjc/57fc2336ad3327a9a594 to your computer and use it in GitHub Desktop.
VisPy IPython Notebook Integration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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