[Python-Dev] Pre-PEP Idea

Paul Prescod paul@prescod.net
Sat, 15 Jul 2000 15:03:15 -0500


Moshe Zadka wrote:
> 
> Do you mean this:
> 
> import sys
> 
> def pager(lines, length=23):
>         while lines:
>                 sys.stdout.writelines(lines[:length])
>                 lines = lines[length:]
>                 if lines:
>                         raw_input("--more--")
> 
> def main():
>         pager(open(sys.argv[1]).readlines())
> 

Okay, okay, it didn't turn out so hard. :) I was just about to write it
myself. Is there a way to get a single key portably, rather than
requiring a return? Not a biggee.

-- 
 Paul Prescod - Not encumbered by corporate consensus
It's difficult to extract sense from strings, but they're the only
communication coin we can count on. 
	- http://www.cs.yale.edu/~perlis-alan/quotes.html