On Sun, Nov 16, 2008 at 1:21 PM, Mike Hoy <[EMAIL PROTECTED]> wrote: > I'm writing a small program that writes to a text file. I want to be > able to view the contents of the text file inside of shell. But the > file is too large for a small shell window. Is there a way for the > user to 'scroll' through the contents of file that has been read into > the program? I noticed that on the man pages that you can do that > although I'm sure it's not written in python. Do I need to find a new > language to write this in? Maybe use a different language for the > output and still use python? Any help appreciated. > > -- > Mike Hoy > http://www.mikehoy.net
As Alan has noted, your request isn't perfectly clear. So, I'm going to change your question and answer it. If I picked the wrong question, please be more explicit in your next reply. Question: How can I read a text file from the command line if the file is too large to fit on the screen at once? Answer: more or less If you're in Windows, you can use the more command: more file.txt That will allow you to scroll up and down. If you're on pretty much any other OS, you can use more or less. I prefer less, because it has more features. You use it the same way you use more: less file.txt _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor