[IPython-dev] using class instances with ipython1
Michael McLay
michael.j.mclay at gmail.com
Mon Jan 14 17:29:00 EST 2008
Is it possible to use class instances with ipython1? I'm getting an
import error message whenever I try to pass a list of class instances
to engines. I've attached a test script and a module, testclass.py,
with a simple, pickleable class defined in it. Here's the traceback:
mmclay at mmclay:~/src/scratchpad$ python test_ipython.py
[<class C 0>, <class C 1>, <class C 2>, <class C 3>, <class C 4>,
<class C 5>, <class C 6>, <class C 7>, <class C 8>, <class C 9>]
Traceback (most recent call last):
File "test_ipython.py", line 16, in <module>
rc.scatterAll('cs', test)
File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
line 808, in scatterAll
return self.scatter('all', key, seq, style, flatten)
File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
line 798, in scatter
localBlock, targets, key, bseq, style, flatten)
File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
line 390, in _executeRemoteMethod
result = self._unpackageResult(rawResult)
File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
line 399, in _unpackageResult
return self._returnOrRaise(result)
File "/usr/lib/python2.5/site-packages/ipython1-0.9alpha2-py2.5.egg/ipython1/kernel/multienginexmlrpc.py",
line 403, in _returnOrRaise
result.raiseException()
File "/usr/lib/python2.5/site-packages/twisted/python/failure.py",
line 259, in raiseException
raise self.type, self.value, self.tb
ImportError: No module named testclass
mmclay at mmclay:~/src/scratchpad$
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_ipython.py
Type: text/x-python
Size: 371 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20080114/e86a7727/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testclass.py
Type: text/x-python
Size: 118 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20080114/e86a7727/attachment-0001.py>
More information about the IPython-dev
mailing list