This is the code i have at the moment
print "Please input the filename:"
n = raw_input()
f = open(n,"r")
x = 0
for line in f.readlines():
print line
x+=1
if x % 20 == 0:
break
q = raw_input()
if q == "":
x+= 20
continue
Things the program should do: 1) Ask for a filename 2) Read the file 3) Print the first 20 lines of the file 4) Stop working after the first 20 lines and wait for an Enter keypress 5) If Enter is pressed show the next 20 lines of the file (20->40 and so on)
Current problem: The loop doesn't restart, it only shows the first 20 lines and then stops working.