|
From: Charles M. <cm...@in...> - 2005-08-08 17:26:46
|
FYI, turning off pprint gets rid of the error. Will look into it more. Fernando Perez wrote: > John Hunter wrote: > >> but in ipython I get the segfault >> >> peds-pc311:~> ipython >> Python 2.4.1 (#2, Mar 30 2005, 21:51:10) >> Type "copyright", "credits" or "license" for more information. >> >> IPython 0.6.16_cvs -- An enhanced Interactive Python. >> ? -> Introduction to IPython's features. >> %magic -> Information about IPython's 'magic' % functions. >> help -> Python's own help system. >> object? -> Details about 'object'. ?object also works, ?? prints >> more. >> >> In [1]: from matplotlib.transforms import unit_bbox >> >> In [2]: b = unit_bbox() >> >> In [3]: b >> Segmentation fault > > > This one is going to be hard to track, since I can't reproduce it on my > system (Fedora 3): > > planck[~]> ip > Python 2.3.4 (#1, Feb 2 2005, 12:11:53) > Type "copyright", "credits" or "license" for more information. > > IPython 0.6.16_svn -- An enhanced Interactive Python. > ? -> Introduction to IPython's features. > %magic -> Information about IPython's 'magic' % functions. > help -> Python's own help system. > object? -> Details about 'object'. ?object also works, ?? prints more. > > In [1]: from matplotlib.transforms import unit_bbox > > In [2]: b = unit_bbox() > > In [3]: b > Out[3]: <Bbox object at 0x965d6d4> > > In [4]: > > In [4]: > planck[~]> pylab > > In [1]: from matplotlib.transforms import unit_bbox > > In [2]: b = unit_bbox() > > In [3]: b > Out[3]: <Bbox object at 0x893866c> > > So neither plain ipython nor 'ipython -pylab' show me any sign of > trouble here. > > I'm afraid we'll have to debug this one by proxy, since I can't see any > problem here. The code which is executed when output is to be printed > is the __call__ method of the CachedOutput object. Look around line 476 > in IPython/Prompts.py. Adding some print/debug statements to that > function might shed some light. > > One thing you could try is toggling %Pprint back and forth. This is the > pretty printer used by ipython, which is part of the stdlib (module > pprint). It might be triggering some problem in the underlying pycxx > objects. > > Cheers, > > f |