title: tkinter, take user input to specify which Label to update
body: <p>I have 46 Labels configured with an image. I want the user to input into a Entry widget which label to change, then I want to change the labels image. Here's a snip of what I have. This code will triggger an AttributeError: 'str' object has no attribute 'configure'</p>
  
  <pre><code>class Agilent(tk.Frame):
  
  def __init__(self, master, **kw):
      super().__init__(master, **kw)
      self.master = master
  
      # Cell Update label plus text
      self.cell_update = tk.Label(self.master, text="Select Cell", font=('times', 14, 'bold'))
      self.cell_update.place(x=200, y=200)
      self.cell_update_entry = tk.Entry(self.master, font=('times', 14, 'bold'), width=32)
      self.cell_update_entry.place(x=400, y=200)
  
      # Takes a value
      self.brick = tk.Label(self.master, text="Brick Number", font=('times', 14, 'bold'))
      self.brick.place(x=460, y=600)
      self.brick_entry = tk.Entry(self.master, font=('times', 14, 'bold'), width=4)
      self.brick_entry.place(x=760, y=600)
      self.brick_entry.config(bd=4)
  
      # execute button
      self.change_cell_button = tk.Button(self.master, text="Change Cell", command=self.cell_color)
      self.change_cell.place(x=800, y=300)
  
      self.grey_cell = ImageTk.PhotoImage(Image.open(file))
      self.grey_cell_image = self.grey_cell
  
      self.orange_cell = ImageTk.PhotoImage(Image.open(file))       
      self.orange_cell_image = self.orange_cell
  
      self.red_cell = ImageTk.PhotoImage(Image.open(file))  
      self.red_cell_image = self.red_cell
  
      self.green_cell = ImageTk.PhotoImage(Image.open(file))            
      self.green_cell_image = self.green_cell
  
      # This is 1 of 46 options labeled cell_1.....cell_n
      self.cell_1 = tk.Label(self.master, image=self.grey_cell_image, background='white')
      self.cell_1.place(x=1460, y=20)
  
  
  def cell_color(self):
      r = self.cell_update_entry.get()
      x = "self." + r                     # Build string to use as Label call
      y = int(self.brick_entry.get())
  
      if y &lt; 1:
          self.cell_1.configure(image=self.orange_cell) # If I call the cell directly this works
  
      elif y % 2 == 0:
          x.configure(image=self.green_cell)#AttrinuteError: 'str' object has no attribute 'configure'
  
      else:
          x.configure(image=self.red_cell)#AttrinuteError: 'str' object has no attribute 'configure'
  
  if __name__ == "__main__":
  
      root = tk.Tk()
      root.title("Wirebond Voltage Drop")
      root.geometry('1600x1200')
      root.resizable(False, False)
  
      dmm = Agilent(root)
      root.mainloop()
  </code></pre>