Page output from inside the python shell (REPL)
import pydoc
pydoc.pager('\n'.join('Hello World %d!' % x for x in xrange(200)))
I had no idea about this. It works well with pythn 2.7 on Ubuntu 12.04
Read more: Link - mitsuhiko comments on how to print output like "less" in shell?