""" file: more.py author: CS1510 description: Display 10 lines of a file at a time """ # prompt for the user to enter a file name fileName = input("more: ") # open the file fileObject = open(fileName,"r") # remember the counts count=-1 # get one line at a time for line in fileObject: count = count + 1 if count == 10: response = input(":_ ") count = 0 #stop? if response == "q": break else: print(line,end='') else: print(line, end='') # close the file fileObject.close()