title: Read Contents of txt file and display in Tkinter GUI Python
body: <p>Hey I have successfully created a <code>tkinter</code> GUI in python which saves the entered values in a text file. Here is the code:</p>
  
  <pre><code>from Tkinter import *
  root = Tk()
  def save():
      open("text.txt","w").close()
      text = e.get() + "\n" + e1.get() + "\n" +  e2.get() + "\n"
      with open("text.txt", "a") as f:
          f.write(text)
  w1 = Label(root, text="Controller value")
  w1.pack()
  e = Entry(root)
  e.pack()
  w2 = Label(root, text="Velocity")
  w2.pack()
  e1 = Entry(root)
  e1.pack()
  w3 = Label(root, text="Desired Heading")
  w3.pack()
  e2 = Entry(root)
  e2.pack()
  toolbar = Frame(root)
  b = Button(toolbar, text="save", width=9, command=save)
  b.pack(side=LEFT, padx=2, pady=2)
  toolbar.pack(side=TOP, fill=X)
  mainloop()
  </code></pre>
  
  <hr>
  
  <p>Now what I want to do is create 3 new textboxes in the GUI which will display the contents of the file. For example my <code>text.txt</code> file has the contents:</p>
  
  <pre><code>3
  
  2
  
  4
  </code></pre>
  
  <p>Now I want each of these 3 values to be displayed in 3 textboxes in the GUI. Basically I want the first textbox in the GUI to display <code>3</code>, second textbox <code>2</code> and third textbox <code>4</code>. Help me out please.</p>