title: How to assign and call multiple variables inside a multiline string with Tkinter
body: <p>I am learning to code and just starting with python. I built my first "on my own" app that i plan to use to automate some typing at work when sending in DHCP requests.  I am having an issue with calling multiple entries that i've set to variables inside a multiline string. I've tried using StringVar() along with textvariable inside the entry (). Any advice would be appreciated. I believe the issue is with the str1 variable but my lack of experience and understanding has me stumped. The results come back with variables PY_VAR0 which means i have something messed up and the program doesn't know where to look (I think).</p>
  
  <pre><code>from Tkinter import *
  
  win = Tk()
  
  win.minsize(width=300, height=200)
  win.maxsize(width=650, height=500)
  
  #Definitions
  def dhcp():
      print str1
  lab1 = Label(win, text="PC Name: ")
  lab2 = Label(win,text="MAC Address: ")
  lab3 = Label(win, text="IP Address")
  but1 = Button(win, text="DHCP", command=dhcp)
  but2 = Button(win, text="NODE")
  but3 = Button(win, text="BOTH")
  pc_name = StringVar()
  entry1 = Entry(win, textvariable=pc_name)
  mac_add = StringVar()
  entry2 = Entry(win, textvariable=mac_add)
  ip_add = StringVar()
  entry3 = Entry(win, textvariable=ip_add)
  
  
  str1= """host %s
                  {
                         hardware ethernet %s ;
                         fixed-address %s ;
                         option host-name %s ;
                  }"""%(pc_name, mac_add, ip_add, pc_name)
  
  #Layout and Framing
  
  lab1.grid(row=0)
  lab2.grid(row=1)
  lab3.grid(row=2)
  entry1.grid(row=0, column=1)
  entry2.grid(row=1, column=1)
  entry3.grid(row=2, column=1)
  but1.grid(row=3, column=0)
  but2.grid(row=4, column=0)
  but3.grid(row=5, column=0)
  
  win.mainloop()
  </code></pre>