[IPython-dev] ipython0 and sys.displayhook
Sun Aug 24 15:09:00 CDT 2008
I've run into a weird bug in editra ipython plugin. When instanciating
ipython0 shell sys.displayhook was aletred by ipython and that interfered
with classical python shell plugin in editra.
I've quick workarounded it with saving sys.displayhook, then creating
ipython0 instance and finally restoring sys.displayhook.
The strange think is that ipython0 is still working. J
In shell.py it seems that you do the same trick I do with "class
While in iplib.py there is:
# I don't like assigning globally to sys, because it means when
# embedding instances, each embedded instance overrides the previous
# choice. But sys.displayhook seems to be called internally by exec,
# so I don't see a way around it. We first save the original and
# overwrite it.
self.sys_displayhook = sys.displayhook
sys.displayhook = self.outputcache
So why this displayhook is used for?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev