Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

""" 

Pager for showing strings 

""" 

 

############################################################################# 

# Copyright (C) 2006 William Stein <wstein@gmail.com> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

# 

# http://www.gnu.org/licenses/ 

############################################################################# 

 

# Currently we just use the IPython pager when not in embedded mode. 

# If we want to use something else, we can just change this function. 

# Any code in sage that uses a pager should use this pager. 

 

 

EMBEDDED_MODE = False 

 

def cat(x): 

print(x) 

 

def pager(): 

if EMBEDDED_MODE: 

return cat 

else: 

import IPython.core.page 

return IPython.core.page.page