Show More
@@ -1,4 +1,3 | |||
|
1 | # encoding: utf-8 | |
|
2 | 1 |
|
|
3 | 2 | |
|
4 | 3 | # Copyright (c) IPython Development Team. |
@@ -7,6 +6,9 | |||
|
7 | 6 | import warnings |
|
8 | 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 | 13 | def page(strng, start=0, screen_lines=0, pager_cmd=None): |
|
12 | 14 | """Print a string, piping through a pager. |
@@ -37,15 +39,3 def page(strng, start=0, screen_lines=0, pager_cmd=None): | |||
|
37 | 39 | start=start, |
|
38 | 40 | ) |
|
39 | 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