I should say I\'m looking for a solution to the problem of viewing output that does not fit on your screen. For example, range(100) will show the last 30ish lin
There's one fundamental difference between less run in a shell, and Python: Python is a programming language, less is a program.
Bash is aware of what the linecount is in the console, and less can query that (and a number of other things), Python on its own can't be, it's a language and it's agnostic to its environment (that's left to libraries).
On top of that, less obeys some of its own standards. Careted lines get moved to top, it feeds to termcap, it's conceptually part of the OS tools, and it's meant to send to output even if it hasn't finished reading the file.
You can write less in Python if you want, or run it from inside a python script, but its functionality is more (and too specific) than a single method of file should contain.