public
Last active

  • Download Gist
ipython_bug.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
from IPython.kernel import client
from nodes import DummyClass #change to wherever you've put DummyClass
 
 
taskclient = client.TaskClient()
 
cmdstr = "result = task.run()"
task = client.StringTask(cmdstr,
push = dict(task=DummyClass()),
pull = 'result')
tid = taskclient.run(task, block = False)
 
res = None
while res == None:
res = taskclient.get_task_result(tid, block = False)
 
print res
 
if res.failure:
res.raise_exception()
ipython_bug_class.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.