[IPython-user] display hook
Wed May 27 07:08:49 CDT 2009
I am trying to use IPython with a package called ROOT, and I am having
problems with interfering display hooks. ROOT uses sys.displayhook to ensure
that graphics are uptodate after a command is run in the interactive prompt.
This works fine so long as ROOT is imported after IPython is started up, but
if ROOT is imported before IPython, then IPython sets its own display hook.
This wouldn't be a problem if IPython ran the displayhook no matter what,
but it is conditional on whether the thing to be displayed is 'None'. If it
is none, then the display hooks are not called. Since many of the functions
which want to update a graphic display are returning None, my graphics are
not being updated.
In IPython version 0.9.1 line 533 of Prompts.py in the __call__ method of
CachedOutput, reads "if arg is not None:", and under that if statement is
the statement "manipulated_val = self.display(arg)". I believe that
self.display(arg) should be called even if arg is None, so that displayhooks
can be used to update graphics.
Please let me know what you think,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-user