##// END OF EJS Templates
cleanup payloadpage (#14613)
M Bussonnier -
r29014:fdd09ec0 merge
parent child Browse files
Show More
@@ -1,4 +1,3
1 # encoding: utf-8
2 """A payload based version of page."""
1 """A payload based version of page."""
3
2
4 # Copyright (c) IPython Development Team.
3 # Copyright (c) IPython Development Team.
@@ -7,6 +6,9
7 import warnings
6 import warnings
8 from IPython.core.getipython import get_ipython
7 from IPython.core.getipython import get_ipython
9
8
9 # see https://github.com/ipython/ipykernel/issues/1304
10 # this should be moved to ipykernel and removed in the long run.
11
10
12
11 def page(strng, start=0, screen_lines=0, pager_cmd=None):
13 def page(strng, start=0, screen_lines=0, pager_cmd=None):
12 """Print a string, piping through a pager.
14 """Print a string, piping through a pager.
@@ -37,15 +39,3 def page(strng, start=0, screen_lines=0, pager_cmd=None):
37 start=start,
39 start=start,
38 )
40 )
39 shell.payload_manager.write_payload(payload)
41 shell.payload_manager.write_payload(payload)
40
41
42 def install_payload_page():
43 """DEPRECATED, use show_in_pager hook
44
45 Install this version of page as IPython.core.page.page.
46 """
47 warnings.warn("""install_payload_page is deprecated.
48 Use `ip.set_hook('show_in_pager, page.as_hook(payloadpage.page))`
49 """)
50 from IPython.core import page as corepage
51 corepage.page = page
General Comments 0
You need to be logged in to leave comments. Login now