page

Sets or retrieves the page width or length.

Synopsis

page (option, pageAttribute)

Required Arguments

int option (Input)
Option giving which page attribute is to be set or retrieved. Possible values are shown below.
Keyword Description
SET_PAGE_WIDTH Sets the page width.
GET_PAGE_WIDTH Retrieves the page width.
SET_PAGE_LENGTH Sets the page length.
GET_PAGE_LENGTH Retrieves the page length.
int pageAttribute (Input, if the attribute is set; Output, otherwise.)
The value of the page attribute to be set or retrieved. The page width is the number of characters per line of output (default 78), and the page length is the number of lines of output per page (default 60). Ten or more characters per line and 10 or more lines per page are required.

Example

The following example illustrates the use of page to set the page width to 40 characters. Function writeMatrix is then used to print a 3 × 4 matrix A, where \(a_{ij}=i+j/10\).

from numpy import *
from pyimsl.stat.page import page, SET_PAGE_WIDTH
from pyimsl.stat.writeMatrix import writeMatrix

nra = 3
nca = 4
a = zeros((nra, nca))
for i in range(0, nra):
    for j in range(0, nca):
        a[i, j] = (i + 1) + (j + 1) / 10.0

page(SET_PAGE_WIDTH, 40)

writeMatrix("a", a)

Output

 
                    a
             1            2            3
1          1.1          1.2          1.3
2          2.1          2.2          2.3
3          3.1          3.2          3.3
 
             4
1          1.4
2          2.4
3          3.4