[IPython-user] ipython and ctypes

Flavio Coelho fccoelho@gmail....
Mon May 28 11:58:24 CDT 2007


Hi,

It seems to be an incompatibility between ipython and the ctypes module.

Every time you try to load a Library with ctypes, the Ipython's inspect
modules complains:

In [1]:from ctypes import *

In [2]:libc =CDLL('libc.so')
ERROR: Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/ipython-0.8.0-py2.5.egg/IPython/ultraTB.py",
line 491, in text
    records = _fixed_getinnerframes(etb, context,self.tb_offset)
  File "/usr/lib/python2.5/site-packages/ipython-0.8.0-py2.5.egg/IPython/ultraTB.py",
line 124, in _fixed_getinnerframes
    records  = inspect.getinnerframes(etb, context)
  File "inspect.py", line 877, in getinnerframes
    framelist.append((tb.tb_frame,) + getframeinfo(tb, context))
  File "inspect.py", line 841, in getframeinfo
    lines, lnum = findsource(frame)
  File "inspect.py", line 510, in findsource
    if pat.match(lines[lnum]): break
IndexError: list index out of range

Unfortunately, your original traceback can not be constructed.

-- 
Flávio Codeço Coelho
----------------------------------------------------------------
Teaching is Impossible, Learning is inevitable.
====================================
registered Linux user # 386432
get counted at http://counter.li.org
----------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20070528/cc32c001/attachment.html 


More information about the IPython-user mailing list