From 9277d76849616a8088f5b7843f1a44fb37e79324 2011-12-06 01:40:59 From: MinRK Date: 2011-12-06 01:40:59 Subject: [PATCH] Don't install payload-pager at the module-level in zmqshell The payload pager should be installed at shell instantiation, otherwise any code that might import zmqshell that is not itself a kernel, will have broken page.page. --- diff --git a/IPython/zmq/zmqshell.py b/IPython/zmq/zmqshell.py index f603ebe..60ed391 100644 --- a/IPython/zmq/zmqshell.py +++ b/IPython/zmq/zmqshell.py @@ -44,12 +44,6 @@ from IPython.zmq.displayhook import ZMQShellDisplayHook, _encode_binary from IPython.zmq.session import extract_header from session import Session -#----------------------------------------------------------------------------- -# Globals and side-effects -#----------------------------------------------------------------------------- - -# Install the payload version of page. -install_payload_page() #----------------------------------------------------------------------------- # Functions and classes @@ -126,6 +120,9 @@ class ZMQInteractiveShell(InteractiveShell): # subprocesses as much as possible. env['PAGER'] = 'cat' env['GIT_PAGER'] = 'cat' + + # And install the payload version of page. + install_payload_page() def auto_rewrite_input(self, cmd): """Called to show the auto-rewritten input for autocall and friends.