some interactive testing I did (as well as actually using it for development):
$ ipython
Python 2.6.2+ (release26-maint, Sep 9 2009, 20:46:31)
Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: from IPython.kernel import client
/usr/lib/pymodules/python2.6/foolscap/banana.py:2: DeprecationWarning: the sets module is deprecated
import struct, sets, time
In [2]: mec = client.MultiEngineClient()
In [3]: mec.get_ids()
Out[3]: [0, 1, 2, 3]
In [4]: mec.execute('print "hello world"')
Out[4]:
<Results List>
[0] In [1]: print "hello world"
[0] Out[1]: hello world
[1] In [1]: print "hello world"
[1] Out[1]: hello world
[2] In [1]: print "hello world"
[2] Out[1]: hello world
[3] In [1]: print "hello world"
[3] Out[1]: hello world
In [5]: serial_result = map(lambda x:x**10, range(32))
In [6]:
In [7]: parallel_result = mec.map(lambda x:x**10, range(32))
In [8]: serial_result == parallel_result
Out[8]: True
some interactive testing I did (as well as actually using it for development):
$ ipython
Python 2.6.2+ (release26-maint, Sep 9 2009, 20:46:31)
Type "copyright", "credits" or "license" for more information.
IPython 0.10 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: from IPython.kernel import client pymodules/ python2. 6/foolscap/ banana. py:2: DeprecationWarning: the sets module is deprecated
/usr/lib/
import struct, sets, time
In [2]: mec = client. MultiEngineClie nt()
In [3]: mec.get_ids()
Out[3]: [0, 1, 2, 3]
In [4]: mec.execute('print "hello world"')
Out[4]:
<Results List>
[0] In [1]: print "hello world"
[0] Out[1]: hello world
[1] In [1]: print "hello world"
[1] Out[1]: hello world
[2] In [1]: print "hello world"
[2] Out[1]: hello world
[3] In [1]: print "hello world"
[3] Out[1]: hello world
In [5]: serial_result = map(lambda x:x**10, range(32))
In [6]:
In [7]: parallel_result = mec.map(lambda x:x**10, range(32))
In [8]: serial_result == parallel_result
Out[8]: True