title: How to properly organize this code?
body: <p>I'm creating  a basic rock-paper-scissors game to get familiar with python and tkinter. I wanted to create a gui and a logic class to separate the two. However, I can't seem to find a code layout that's both valid in python and makes sense to me.</p>
  
  <p>I want the <code>Gui</code> class to only know about the widgets and update them.</p>
  
  <pre><code>class Gui:      
      def setup(self):
          root = Tk.Tk()
          root.geometry("370x170")
          root.resizable(width=False, height=False)
          root.title("Rock, Paper, Scissors")
          root.iconbitmap("Play.ico")
  
          rock_button = Tk.Button(root, text="Rock", command=rock_clicked)
          rock_button.place(width=100, height=30, x=10, y=30)
  
          paper_button = Tk.Button(root, text="Paper", command=paper_clicked)
          paper_button.place(width=100, height=30, x=10, y=70)
  
          scissors_button = Tk.Button(root, text="Scissors", command=scissors_clicked)
          scissors_button.place(width=100, height=30, x=10, y=110)
  
          score_font = font.Font(family="Helvetica", size=20)
  
          own_score_lbl = Tk.Label(root, text="0", relief=Tk.RIDGE, font=score_font)
          own_score_lbl.place(width=50, height=110, x=120, y=30)
  
          ai_score_lbl = Tk.Label(root, text="0", relief=Tk.RIDGE, font=score_font)
          ai_score_lbl.place(width=50, height=110, x=200, y=30)
  
          ai_choice = Tk.Label(root, relief=Tk.RIDGE)
          ai_choice.place(width=100, height=110, x=260, y=30)
  
          root.mainloop()
  
  gui = Gui()
  gui.setup()
  </code></pre>
  
  <p>In other languages, I'm used to having a logic member variable in the gui class, and vice versa. That doesn't work here. The click handler functions can't be members of the logic class, becuase of the <code>self</code> argument. So I tried to declare them module-level, and call methods of the logic class from those, that didn't work out either.</p>
  
  <p>Ideally, after a click event, I would expect a logic class method to be called, which then makes it's calculations, and calls an appropriate gui method back i.e. <code>set_label_text()</code>.</p>
  
  <p>How can I accomplish this with an OO design?</p>