|
From: Fernando P. <Fer...@co...> - 2005-08-10 04:22:10
|
Charles Moad wrote: > I would consider this a python bug, and I just added a quick fix for me. > > Changed line 511 in Prompts.py to say > if self.Pprint and hasattr(arg, '__repr__'): > instead of > if self.Pprint: > > You probably don't want to add this for everything, but would it be possible to > override the display method of the CachedOutput when the pylab option is > specified? Further, you could only do this for python v.2.4. Since it's really a python bug, I'd rather see it fixed upstream than adding (yet another) hack in ipython to defend against it. But I also don't want ipython to crash for users, that's for sure. Let's see if John can get his pycxx animals to grow a __repr__, which will fix the issue. If that doesn't work, I'll go ahead and stick in a version-specific defense layer into Prompts.py to at least help the ipython users, while python fixes the problem upstream. Cheers, f |