[IPython-dev] ipython0 and sys.displayhook
Laurent Dufrechou
laurent.dufrechou at gmail.com
Mon Aug 25 05:28:14 EDT 2008
Hi ville,
> > So why this displayhook is used for?
>
> You can see that it's used as outputcache. Also, result_display hooks
> are hooked to it.
>
> IPython may appear to work if you change it, but it really doesn't
> work properly.
>
> So, you don't really want to forget ipythons display hook.
Arf bad news :/
Thx for your quick reply.
What's strange is that in "class IPShellEmbed" in Shell.py line 178 the same
trick like I did is used. So either, IPShellEmbed could be buggy either
there is a trick used inside that permits to restore sys.display hook...
Will read this code tonight, there must be a trick if you said that
sys.displayhook is important!
(in comment it is said it used by 'exec' but so far I haven't seen side
effect, perhaps that's because I'm using a recent python interpreter...)
Will check result_display/outputcache too... thx
Cheers,
Laurent
More information about the IPython-dev
mailing list