title: How to make a tkinter GUI output screen following a database search
body: <p>Hi I have created a database and have used a query which all works on python. Now I am trying to create a GUI for the program. The query depends on a user input, I have so far managed to create a menu screen and the input screen but am unsure on how to get the results from the query into the GUI screen. Also I have not used a class to do this. Please can anyone help?</p>
  
  <p>Here is an example of what the code and search looks like;</p>
  
  <pre><code>def Search():
      global E1, E2, E3, E4, file
  
      #Retaining user input
      Entry1 = E1.get()
      Entry2 = E2.get()
      Entry3 = E3.get()
      Entry4 = E4.get()
  
      #The search
      cursor = file.execute ('''SELECT patient_ID, forename, surname, DOB,from practicedatabase WHERE variable1 =? and variable2=? and variable3=? and variable4=?''', (Entry1, Entry2, Entry3, Entry4)) 
  
  for row in cursor:
      print ("ID = ", row[0])
      print ("Forename = ", row[1])
      print ("Surname = ", row[2])
      print ("DOB = ", row[3])
  
  
  print ("Search complete ");
  file.close()
  </code></pre>