title: Passing extra arguments with Tkinter Bindings
body: <p>I'm trying to bind an extra argument <strong>opt</strong> to the following radiobuttons below. I'm trying to make it so that when <strong>WSRB_UD</strong> is triggered I can know which radiobutton triggered it. How do I go about this?  </p>
  
  <p>Snippet:</p>
  
  <pre><code>        self.WS.SW.SearchFrame = []
          self.WS.SW.SearchRB = []
  
          self.WS.RBvar  = Tkinter.IntVar()
  
          i = 0
          while i &lt; 6 :
  
              Frame = Tkinter.Frame(self.WS.SW.OptFrame, width=125, height=22, bd=1,
                                               bg=self.WSbg)
              Frame.grid(column=0, row=4 + i)
              Frame.grid_propagate(0)
  
              self.WS.SW.SearchFrame.append(Frame)
  
  
              RB = Tkinter.Radiobutton(self.WS.SW.SearchFrame[i], value=i, 
                                 variable=self.WS.RBvar, indicatoron=0, font=self.WSfo,
                                 fg=self.WSfg, activeforeground=self.WSfg, bg=self.WSbg, activebackground=self.WSbg,
                                 selectcolor=self.WSbg, bd=self.WSbw)
              RB.grid()
              RB.bind( "&lt;Enter&gt;", self.WSRB_UD, i)
              print i
  
              self.WS.SW.SearchRB.append(RB)
  
              i = i + 1
  
          self.QuickLinkList= []
          self.WS_timer_count = 0
  
      def WSRB_UD(self, event, opt):
          print self.WS.RBvar.get()
  </code></pre>