Reading from text file

Fredrik Lundh fredrik at pythonware.com
Tue Aug 26 19:28:50 CEST 2008


A. Joseph wrote:

> I want to read from text file, 25 lines each time i press enter key,
> just like the python documentation.

you can use pydoc's pager from your program:

     import pydoc

     text = open(filename).read()
     pydoc.pager(text)

</F>




More information about the Python-list mailing list