Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Two displayhooks in zmq #512

takluyver opened this Issue Jun 10, 2011 · 2 comments


None yet
2 participants

takluyver commented Jun 10, 2011

The ZMQShell uses a ZMQDisplayHook object defined in IPython/zmq/zmqshell.py, which inherits from the DisplayHook in core. But there's also a DisplayHook defined separately in IPython/zmq/displayhook.py, which seems to be used by the parallel engine.

This is a little confusing - the two classes should probably both be in IPython/zmq/displayhook.py, and could also have clearer names - perhaps ZMQDisplayHook and ZMQRichDisplayHook.


minrk commented Jun 10, 2011

The hook in zmq.displayhook is a generic one that could be used any time you want to forward display over zeromq. The hook in zmq.zmqshell is a subclass that adds the extra bits an InteractiveShell expects.

I don't see a reason not to put them both in zmq.displayhook. I wouldn't choose RichDisplayHook as the name for the InteractiveShell-bound one. Maybe ZMQDisplayHook and ZMQShellDisplayHook, since the latter is for use in the ZMQShell?


minrk commented Jun 24, 2011

this was closed by PR #527

@minrk minrk closed this Jun 24, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment