Advertisement
182days

Text File Reader

Apr 25th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. #display the contents of a text file line by line with timings.
  2. import time
  3. def line():
  4.     while True:
  5.         print(f.readline())
  6.         time.sleep(1)
  7. f=open("data.txt","r")
  8. print("text file reader v1.0")
  9. start = input("Press the 'G' key to go!!!")
  10. if start == "g":
  11.     line()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement