Skip to content
Create a gist now

Instantly share code, notes, and snippets.

from IPython.kernel import client
from nodes import DummyClass #change to wherever you've put DummyClass
taskclient = client.TaskClient()
cmdstr = "result ="
task = client.StringTask(cmdstr,
push = dict(task=DummyClass()),
pull = 'result')
tid =, block = False)
res = None
while res == None:
res = taskclient.get_task_result(tid, block = False)
print res
if res.failure:
#must be in PYTHONPATH
class DummyClass(object):
def run(self):
return self._methodA()
def _methodA(self):
return self._methodB()
def _methodB(self):
return self._methodC()
def _methodC(self):
raise IOError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.