sympy/sympy — pull request #1192 by ness01 (2012-04-01 10:41:26+00:00)
Title: [printing] Implement pager_print.

This is a function which invokes an external pager, as determined by the
pydoc module, to print output. It is meant mainly to display long
expressions in a sideways scrolling pager like "less -S".

Try:

```
>>> e = Add(*[x**n for n in range(100)])
>>> pager_print(e) # use sideways scrolling
>>> pager_print(e, num_columns=None) # use line wrapping
```

Note that `~/.ipython/profile_default/startup` can be used to set `os.environ['PAGER'] = 'less -S'`.

[This example is not terribly useful, but I plan to write code for chain complexes where sideways scrolling is going to be fairly crucial.]