Skip to content

Instantly share code, notes, and snippets.

Last active Nov 13, 2018
What would you like to do?
from IPython import get_ipython
from IPython.core.magic import register_cell_magic
from tornado import ioloop
from functools import partial
def noblock(line, cell):
""" Jupyter Magic to run cell code asynchronously """
async_loop = ioloop.IOLoop.instance()
ipy = get_ipython()
executor = None # use default
future = async_loop.run_in_executor(executor, partial(ipy.run_cell, raw_cell=cell))
def alert_done():
""" Code to execute when the cell finishes running! """
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment