title: Print to Tkinter GUI, not console
body: <p>I have some scripts written containing a handful of functions to do some webscraping. When running the scripts, the results print to the IDLE shell using simple 'print' commands.</p>
  
  <p>I have a basic tkinter GUI that will run the script when a button is clicked, but the results still get printed to the shell. How could I adjust my code so that when Master.master() is called, all the print statements embedded in that process print to some area on my GUI. The code I have is the following:</p>
  
  <pre><code>from tkinter import *
  import Master #Importing my scraper function
  
  win = Tk()
  win.title('Hashtag Scraper')
  
  SearchButton = Button(win,text = 'Search')
  
  SearchButton.grid(row=2,column = 1)
  
  htag_label = Label(win,text = 'What Hashtag?')
  htag_label.grid(row = 1,column = 0)
  
  email_label = Label(win,text = 'FB Email')
  email_label.grid(row = 1,column = 1)
  
  password_label = Label(win,text = 'FB Password')
  password_label.grid(row = 1,column = 2)
  
  def button():
      htag = hashtag.get()
      user = usr.get()
      password = pwd.get()
      Master.master(htag,refresh = 3,usr = user,pwd = password) #Function call - want this to print on GUI instead of shell
  
  #win.bind('&lt;Return&gt;', SearchButton)
  
  SearchButton.configure(command = button)
  
  
  hashtag = StringVar()
  #hashtag.set('Hashtag')
  hashtag_entry = Entry(win,textvariable=hashtag)
  hashtag_entry.grid(row = 0, column = 0)
  
  usr = StringVar()
  usr.set('test@aol.com')
  usr_entry = Entry(win,textvariable=usr)
  usr_entry.grid(row = 0, column = 1)
  
  pwd = StringVar()
  #pwd.set('FB Password')
  pwd_entry = Entry(win,textvariable=pwd)
  pwd_entry.grid(row = 0, column = 2)
  </code></pre>