diff --git a/docs/examples/kernel/asynctask1.py b/docs/examples/kernel/asynctask1.py deleted file mode 100644 index 2b0ca34..0000000 --- a/docs/examples/kernel/asynctask1.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# encoding: utf-8 - -# This example shows how the AsynTaskClient can be used -# This example is currently broken - -from twisted.internet import reactor, defer -from IPython.kernel import asyncclient - -mec = asyncclient.AsyncMultiEngineClient(('localhost', 10105)) -tc = asyncclient.AsyncTaskClient(('localhost',10113)) - -cmd1 = """\ -a = 5 -b = 10*d -c = a*b*d -""" - -t1 = asyncclient.Task(cmd1, clear_before=False, clear_after=True, pull=['a','b','c']) - -d = mec.push(dict(d=30)) - -def raise_and_print(tr): - tr.raiseException() - print "a, b: ", tr.ns.a, tr.ns.b - return tr - -d.addCallback(lambda _: tc.run(t1)) -d.addCallback(lambda tid: tc.get_task_result(tid,block=True)) -d.addCallback(raise_and_print) -d.addCallback(lambda _: reactor.stop()) -reactor.run() diff --git a/docs/examples/kernel/mcpricer.py b/docs/examples/kernel/mcpricer.py index 72206d0..2dac9f1 100644 --- a/docs/examples/kernel/mcpricer.py +++ b/docs/examples/kernel/mcpricer.py @@ -40,3 +40,4 @@ def main(): if __name__ == '__main__': main() + diff --git a/docs/examples/kernel/rmt.ipy b/docs/examples/kernel/rmt.ipy index c4f4063..ab47c5e 100644 --- a/docs/examples/kernel/rmt.ipy +++ b/docs/examples/kernel/rmt.ipy @@ -53,5 +53,5 @@ if __name__ == '__main__': %timeit -n1 -r1 parallelDiffs(rc, nmats, matsize) # Uncomment these to plot the histogram - import pylab - pylab.hist(parallelDiffs(rc,matsize,matsize)) + # import pylab + # pylab.hist(parallelDiffs(rc,matsize,matsize))